Skip to content

[3.7] Fix misleading mentions of tp_size in comments (GH-9093) #9136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/_abc.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ PyDoc_STRVAR(abc_data_doc,
static PyTypeObject _abc_data_type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"_abc_data", /*tp_name*/
sizeof(_abc_data), /*tp_size*/
sizeof(_abc_data), /*tp_basicsize*/
.tp_dealloc = (destructor)abc_data_dealloc,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_alloc = PyType_GenericAlloc,
Expand Down
2 changes: 1 addition & 1 deletion Modules/_blake2/blake2b_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ py_blake2b_dealloc(PyObject *self)
PyTypeObject PyBlake2_BLAKE2bType = {
PyVarObject_HEAD_INIT(NULL, 0)
"_blake2.blake2b", /* tp_name */
sizeof(BLAKE2bObject), /* tp_size */
sizeof(BLAKE2bObject), /* tp_basicsize */
0, /* tp_itemsize */
py_blake2b_dealloc, /* tp_dealloc */
0, /* tp_print */
Expand Down
2 changes: 1 addition & 1 deletion Modules/_blake2/blake2s_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ py_blake2s_dealloc(PyObject *self)
PyTypeObject PyBlake2_BLAKE2sType = {
PyVarObject_HEAD_INIT(NULL, 0)
"_blake2.blake2s", /* tp_name */
sizeof(BLAKE2sObject), /* tp_size */
sizeof(BLAKE2sObject), /* tp_basicsize */
0, /* tp_itemsize */
py_blake2s_dealloc, /* tp_dealloc */
0, /* tp_print */
Expand Down
2 changes: 1 addition & 1 deletion Modules/_queuemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ static PyMethodDef simplequeue_methods[] = {
static PyTypeObject PySimpleQueueType = {
PyVarObject_HEAD_INIT(NULL, 0)
"_queue.SimpleQueue", /*tp_name*/
sizeof(simplequeueobject), /*tp_size*/
sizeof(simplequeueobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)simplequeue_dealloc, /*tp_dealloc*/
Expand Down
2 changes: 1 addition & 1 deletion Modules/_sha3/sha3module.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ static PyGetSetDef SHA3_getseters[] = {
static PyTypeObject type_obj = { \
PyVarObject_HEAD_INIT(NULL, 0) \
type_name, /* tp_name */ \
sizeof(SHA3object), /* tp_size */ \
sizeof(SHA3object), /* tp_basicsize */ \
0, /* tp_itemsize */ \
/* methods */ \
(destructor)SHA3_dealloc, /* tp_dealloc */ \
Expand Down
4 changes: 2 additions & 2 deletions Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static PyMethodDef lock_methods[] = {
static PyTypeObject Locktype = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"_thread.lock", /*tp_name*/
sizeof(lockobject), /*tp_size*/
sizeof(lockobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)lock_dealloc, /*tp_dealloc*/
Expand Down Expand Up @@ -487,7 +487,7 @@ static PyMethodDef rlock_methods[] = {
static PyTypeObject RLocktype = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"_thread.RLock", /*tp_name*/
sizeof(rlockobject), /*tp_size*/
sizeof(rlockobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)rlock_dealloc, /*tp_dealloc*/
Expand Down
2 changes: 1 addition & 1 deletion Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ static PyGetSetDef MD5_getseters[] = {
static PyTypeObject MD5type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_md5.md5", /*tp_name*/
sizeof(MD5object), /*tp_size*/
sizeof(MD5object), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
MD5_dealloc, /*tp_dealloc*/
Expand Down
2 changes: 1 addition & 1 deletion Modules/mmapmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ To map anonymous memory, pass -1 as the fileno (both versions).");
static PyTypeObject mmap_object_type = {
PyVarObject_HEAD_INIT(NULL, 0)
"mmap.mmap", /* tp_name */
sizeof(mmap_object), /* tp_size */
sizeof(mmap_object), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */
(destructor) mmap_object_dealloc, /* tp_dealloc */
Expand Down
4 changes: 2 additions & 2 deletions Modules/ossaudiodev.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ oss_getattro(oss_audio_t *self, PyObject *nameobj)
static PyTypeObject OSSAudioType = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"ossaudiodev.oss_audio_device", /*tp_name*/
sizeof(oss_audio_t), /*tp_size*/
sizeof(oss_audio_t), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)oss_dealloc, /*tp_dealloc*/
Expand Down Expand Up @@ -996,7 +996,7 @@ static PyTypeObject OSSAudioType = {
static PyTypeObject OSSMixerType = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"ossaudiodev.oss_mixer_device", /*tp_name*/
sizeof(oss_mixer_t), /*tp_size*/
sizeof(oss_mixer_t), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)oss_mixer_dealloc, /*tp_dealloc*/
Expand Down
2 changes: 1 addition & 1 deletion Modules/sha1module.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ static PyGetSetDef SHA1_getseters[] = {
static PyTypeObject SHA1type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_sha1.sha1", /*tp_name*/
sizeof(SHA1object), /*tp_size*/
sizeof(SHA1object), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
SHA1_dealloc, /*tp_dealloc*/
Expand Down
4 changes: 2 additions & 2 deletions Modules/sha256module.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ static PyMemberDef SHA_members[] = {
static PyTypeObject SHA224type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_sha256.sha224", /*tp_name*/
sizeof(SHAobject), /*tp_size*/
sizeof(SHAobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
SHA_dealloc, /*tp_dealloc*/
Expand Down Expand Up @@ -563,7 +563,7 @@ static PyTypeObject SHA224type = {
static PyTypeObject SHA256type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_sha256.sha256", /*tp_name*/
sizeof(SHAobject), /*tp_size*/
sizeof(SHAobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
SHA_dealloc, /*tp_dealloc*/
Expand Down
4 changes: 2 additions & 2 deletions Modules/sha512module.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static PyMemberDef SHA_members[] = {
static PyTypeObject SHA384type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_sha512.sha384", /*tp_name*/
sizeof(SHAobject), /*tp_size*/
sizeof(SHAobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
SHA512_dealloc, /*tp_dealloc*/
Expand Down Expand Up @@ -628,7 +628,7 @@ static PyTypeObject SHA384type = {
static PyTypeObject SHA512type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_sha512.sha512", /*tp_name*/
sizeof(SHAobject), /*tp_size*/
sizeof(SHAobject), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
SHA512_dealloc, /*tp_dealloc*/
Expand Down
4 changes: 2 additions & 2 deletions Objects/moduleobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down Expand Up @@ -789,7 +789,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 */
Expand Down
2 changes: 1 addition & 1 deletion Objects/namespaceobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down