mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Issue #8651: Fix "z#" format of PyArg_Parse*() function: the size was not
written if PY_SSIZE_T_CLEAN is defined.
This commit is contained in:
parent
112d48ac17
commit
645b9f67ae
2 changed files with 8 additions and 4 deletions
|
@ -9,6 +9,9 @@ What's New in Python 2.7.2?
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #8651: Fix "z#" format of PyArg_Parse*() function: the size was not
|
||||||
|
written if PY_SSIZE_T_CLEAN is defined.
|
||||||
|
|
||||||
- Issue #9756: When calling a method descriptor or a slot wrapper descriptor,
|
- Issue #9756: When calling a method descriptor or a slot wrapper descriptor,
|
||||||
the check of the object type doesn't read the __class__ attribute anymore.
|
the check of the object type doesn't read the __class__ attribute anymore.
|
||||||
Fix a crash if a class override its __class__ attribute (e.g. a proxy of the
|
Fix a crash if a class override its __class__ attribute (e.g. a proxy of the
|
||||||
|
|
|
@ -984,10 +984,11 @@ convertsimple(PyObject *arg, const char **p_format, va_list *p_va, int flags,
|
||||||
if (*format == '#') {
|
if (*format == '#') {
|
||||||
FETCH_SIZE;
|
FETCH_SIZE;
|
||||||
assert(0); /* XXX redundant with if-case */
|
assert(0); /* XXX redundant with if-case */
|
||||||
if (arg == Py_None)
|
if (arg == Py_None) {
|
||||||
*q = 0;
|
STORE_SIZE(0);
|
||||||
else
|
} else {
|
||||||
*q = PyString_Size(arg);
|
STORE_SIZE(PyString_Size(arg));
|
||||||
|
}
|
||||||
format++;
|
format++;
|
||||||
}
|
}
|
||||||
else if (*p != NULL &&
|
else if (*p != NULL &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue