#if defined(CACHE_HASH) || PY_VERSION_HEX >= 0x02030000
x->ob_shash = -1;
#endif
+#ifdef PY2
x->ob_sstate = SSTATE_NOT_INTERNED;
+#endif
return ((PyObject *)x);
}
PyObject *rc = 0;
if (i < 0 || i >= BIN_LEN(me)) IXERR("out of range");
+#ifdef PY3
+ rc = getulong(BIN_PTR(me)[i]&0xff);
+#else
rc = bytestring_pywrap(BIN_PTR(me) + i, 1);
+#endif
end:
return (rc);
}
if (i < 0) i += BIN_LEN(me);
rc = bytestring_pyitem(me, i);
} else if (PySlice_Check(ix)) {
- if (PySlice_GetIndicesEx((PySliceObject *)ix, BIN_LEN(me),
- &i, &j, &k, &n))
+ if (PySlice_GetIndicesEx(PY23((PySliceObject *), NOTHING)ix,
+ BIN_LEN(me), &i, &j, &k, &n))
return (0);
if (k == 1) return bytestring_pyslice(me, i, j);
rc = bytestring_pywrap(0, n);
0, /* @nb_add@ */
0, /* @nb_subtract@ */
0, /* @nb_multiply@ */
+#ifdef PY2
0, /* @nb_divide@ */
+#endif
0, /* @nb_remainder@ */
0, /* @nb_divmod@ */
0, /* @nb_power@ */