~mdw
/
catacomb-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*.c: Use the new `Py_TYPE' and `Py_SIZE' macros; define them if necessary.
[catacomb-python]
/
bytestring.c
diff --git
a/bytestring.c
b/bytestring.c
index
3bf1b25
..
5fdd5d9
100644
(file)
--- a/
bytestring.c
+++ b/
bytestring.c
@@
-192,7
+192,7
@@
static PyObject *bytestring_pyslice(PyObject *me, Py_ssize_t i, Py_ssize_t j)
if (j < 0) j = 0;
else if (j > n) j = n;
if (j < i) i = j = 0;
if (j < 0) j = 0;
else if (j > n) j = n;
if (j < i) i = j = 0;
- if (i == 0 && j == n &&
me->ob_type
== bytestring_pytype)
+ if (i == 0 && j == n &&
Py_TYPE(me)
== bytestring_pytype)
{ Py_INCREF(me); rc = me; goto end; }
rc = bytestring_pywrap(PyString_AS_STRING(me) + i, j - i);
end:
{ Py_INCREF(me); rc = me; goto end; }
rc = bytestring_pywrap(PyString_AS_STRING(me) + i, j - i);
end: