]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] Fix misleading mentions of tp_size in comments (GH-9138)
authorBenjamin Peterson <benjamin@python.org>
Mon, 10 Sep 2018 17:50:15 +0000 (10:50 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Sep 2018 17:50:15 +0000 (10:50 -0700)
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>
Modules/md5module.c
Modules/mmapmodule.c
Modules/ossaudiodev.c
Modules/sha256module.c
Modules/sha512module.c
Objects/moduleobject.c

index 103da1497dac9607d593801a6980d8cdc0645e6a..dd90a22c00bfefb41f0b3197cb93ae77449ca8b3 100644 (file)
@@ -236,7 +236,7 @@ copy() -- return a copy of the current md5 object");
 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*/
index bafdce3b1f84282a51c203aa319be1455862e57d..02b31ca438a911d3731816a0e3355978899dd6e3 100644 (file)
@@ -1026,7 +1026,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 */
index 284cc610761900ca877f4c03d6e4997d7520f165..f833bb257f7a5377144db7f55aac8e7d62a47417 100644 (file)
@@ -842,7 +842,7 @@ oss_mixer_getattr(oss_mixer_t *self, char *name)
 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 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*/
index 8f18faa17a594873057f046b49337e84cbb3332a..76e52209f630a36316ce10239e58603623108bf2 100644 (file)
@@ -537,7 +537,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*/
@@ -571,7 +571,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*/
index abc90218053f1d27458820412e71ad9fa089dda0..e3733e0443fff3fb601306ff2d1a6b60f039ec95 100644 (file)
@@ -603,7 +603,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*/
@@ -637,7 +637,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*/
index f2fed30e90dd8e3cb3cc09a3d6e93d494cff61f2..fd48ff176e75d07400a594e3e5fee49ecbe04019 100644 (file)
@@ -221,7 +221,7 @@ The name must be a string; the optional doc argument can have any type.");
 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 */