diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-05-21 09:35:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-21 09:35:41 (GMT) |
commit | 1179f4b40f375af5c59cd4b6be9cc313fa0e1a37 (patch) | |
tree | b1c19c071e484c60f207a77571bc34a3a2ea4951 /Modules | |
parent | e2537521916c5bf88fcf54d4654ff1bcd332be4a (diff) | |
download | cpython-1179f4b40f375af5c59cd4b6be9cc313fa0e1a37.zip cpython-1179f4b40f375af5c59cd4b6be9cc313fa0e1a37.tar.gz cpython-1179f4b40f375af5c59cd4b6be9cc313fa0e1a37.tar.bz2 |
bpo-33583: Add note in PyObject_GC_Resize() doc (GH-7021)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/gcmodule.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 8ba1093..09c7356 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -1752,6 +1752,7 @@ _PyObject_GC_Resize(PyVarObject *op, Py_ssize_t nitems) { const size_t basicsize = _PyObject_VAR_SIZE(Py_TYPE(op), nitems); PyGC_Head *g = AS_GC(op); + assert(!IS_TRACKED(op)); if (basicsize > PY_SSIZE_T_MAX - sizeof(PyGC_Head)) return (PyVarObject *)PyErr_NoMemory(); g = (PyGC_Head *)PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize); |