mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
This commit is contained in:
parent
d586559c31
commit
e93237dfcc
108 changed files with 916 additions and 908 deletions
|
@ -1689,7 +1689,7 @@ getstring(PyObject* string, Py_ssize_t* p_length, int* p_charsize)
|
|||
#endif
|
||||
|
||||
/* get pointer to string buffer */
|
||||
buffer = Py_Type(string)->tp_as_buffer;
|
||||
buffer = Py_TYPE(string)->tp_as_buffer;
|
||||
if (!buffer || !buffer->bf_getreadbuffer || !buffer->bf_getsegcount ||
|
||||
buffer->bf_getsegcount(string, NULL) != 1) {
|
||||
PyErr_SetString(PyExc_TypeError, "expected string or buffer");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue