[2.7] Fix misleading mentions of tp_size in comments (GH-9138)
Many type object initializations labeled a field "tp_size" in the
comment, but the name of that field is tp_basicsize..
(cherry picked from commit 0e0bc4e221f592f305d335faf5f8046484eb9238)
Co-authored-by: Peter Eisentraut <peter@eisentraut.org>
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 103da14..dd90a22 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -236,7 +236,7 @@
static PyTypeObject MD5type = {
PyVarObject_HEAD_INIT(NULL, 0)
"_md5.md5", /*tp_name*/
- sizeof(md5object), /*tp_size*/
+ sizeof(md5object), /*tp_basicsize*/
0, /*tp_itemsize*/
/* methods */
(destructor)md5_dealloc, /*tp_dealloc*/
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index bafdce3..02b31ca 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1026,7 +1026,7 @@
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 */
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 284cc61..f833bb2 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -842,7 +842,7 @@
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*/
@@ -856,7 +856,7 @@
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*/
diff --git a/Modules/sha256module.c b/Modules/sha256module.c
index 8f18faa..76e5220 100644
--- a/Modules/sha256module.c
+++ b/Modules/sha256module.c
@@ -537,7 +537,7 @@
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*/
@@ -571,7 +571,7 @@
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*/
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index abc9021..e3733e0 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -603,7 +603,7 @@
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*/
@@ -637,7 +637,7 @@
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*/