diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2018-09-10 16:46:08 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2018-09-10 16:46:08 (GMT) |
commit | 0e0bc4e221f592f305d335faf5f8046484eb9238 (patch) | |
tree | edd0715556a68ab5bd9037a2a627bb8a62d9ef6a /Objects | |
parent | d545869d084e70d4838310e79b52a25a72a1ca56 (diff) | |
download | cpython-0e0bc4e221f592f305d335faf5f8046484eb9238.zip cpython-0e0bc4e221f592f305d335faf5f8046484eb9238.tar.gz cpython-0e0bc4e221f592f305d335faf5f8046484eb9238.tar.bz2 |
Fix misleading mentions of tp_size in comments (GH-9093)
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/moduleobject.c | 4 | ||||
-rw-r--r-- | Objects/namespaceobject.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index 2156ca0..ccf5f8e 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -35,7 +35,7 @@ bad_traverse_test(PyObject *self, void *arg) { PyTypeObject PyModuleDef_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "moduledef", /* tp_name */ - sizeof(struct PyModuleDef), /* tp_size */ + sizeof(struct PyModuleDef), /* tp_basicsize */ 0, /* tp_itemsize */ }; @@ -790,7 +790,7 @@ static PyMethodDef module_methods[] = { PyTypeObject PyModule_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "module", /* tp_name */ - sizeof(PyModuleObject), /* tp_size */ + sizeof(PyModuleObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)module_dealloc, /* tp_dealloc */ 0, /* tp_print */ diff --git a/Objects/namespaceobject.c b/Objects/namespaceobject.c index a6c941a..0b90269 100644 --- a/Objects/namespaceobject.c +++ b/Objects/namespaceobject.c @@ -201,7 +201,7 @@ SimpleNamespace(**kwargs)"); PyTypeObject _PyNamespace_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "types.SimpleNamespace", /* tp_name */ - sizeof(_PyNamespaceObject), /* tp_size */ + sizeof(_PyNamespaceObject), /* tp_basicsize */ 0, /* tp_itemsize */ (destructor)namespace_dealloc, /* tp_dealloc */ 0, /* tp_print */ |