summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2018-09-10 10:50:15 -0700
committerGitHub <noreply@github.com>2018-09-10 10:50:15 -0700
commited62e645101fdd83aee519f6f33a4384ff79f105 (patch)
tree2feb03416ac04ccc4e47f1bb962d044b6613f560
parentf51a46631f8dcca596c08a934a766da9afe93c06 (diff)
downloadcpython-git-ed62e645101fdd83aee519f6f33a4384ff79f105.tar.gz
[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>
-rw-r--r--Modules/md5module.c2
-rw-r--r--Modules/mmapmodule.c2
-rw-r--r--Modules/ossaudiodev.c4
-rw-r--r--Modules/sha256module.c4
-rw-r--r--Modules/sha512module.c4
-rw-r--r--Objects/moduleobject.c2
6 files changed, 9 insertions, 9 deletions
diff --git a/Modules/md5module.c b/Modules/md5module.c
index 103da1497d..dd90a22c00 100644
--- a/Modules/md5module.c
+++ b/Modules/md5module.c
@@ -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*/
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index bafdce3b1f..02b31ca438 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -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 */
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c
index 284cc61076..f833bb257f 100644
--- a/Modules/ossaudiodev.c
+++ b/Modules/ossaudiodev.c
@@ -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*/
diff --git a/Modules/sha256module.c b/Modules/sha256module.c
index 8f18faa17a..76e52209f6 100644
--- a/Modules/sha256module.c
+++ b/Modules/sha256module.c
@@ -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*/
diff --git a/Modules/sha512module.c b/Modules/sha512module.c
index abc9021805..e3733e0443 100644
--- a/Modules/sha512module.c
+++ b/Modules/sha512module.c
@@ -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*/
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index f2fed30e90..fd48ff176e 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -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 */