diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/bytesobject.h | 2 | ||||
-rw-r--r-- | Include/stringobject.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Include/bytesobject.h b/Include/bytesobject.h index a649d39..f1e01d1 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -42,7 +42,7 @@ PyAPI_FUNC(int) PyBytes_Resize(PyObject *, Py_ssize_t); /* Macros, trading safety for speed */ #define PyBytes_AS_STRING(self) (assert(PyBytes_Check(self)),((PyBytesObject *)(self))->ob_bytes) -#define PyBytes_GET_SIZE(self) (assert(PyBytes_Check(self)),((PyBytesObject *)(self))->ob_size) +#define PyBytes_GET_SIZE(self) (assert(PyBytes_Check(self)),Py_Size(self)) #ifdef __cplusplus } diff --git a/Include/stringobject.h b/Include/stringobject.h index 1d932ff..c6ae1a8 100644 --- a/Include/stringobject.h +++ b/Include/stringobject.h @@ -85,7 +85,7 @@ PyAPI_FUNC(void) _Py_ReleaseInternedStrings(void); /* Macro, trading safety for speed */ #define PyString_AS_STRING(op) (assert(PyString_Check(op)),(((PyStringObject *)(op))->ob_sval)) -#define PyString_GET_SIZE(op) (assert(PyString_Check(op)),(((PyStringObject *)(op))->ob_size)) +#define PyString_GET_SIZE(op) (assert(PyString_Check(op)),Py_Size(op)) /* _PyString_Join(sep, x) is like sep.join(x). sep must be PyStringObject*, x must be an iterable object. */ |