Skip to content

Commit 444b1cd

Browse files
peterebenjaminp
authored andcommitted
[3.6] 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.. (cherry picked from commit 0e0bc4e) Co-authored-by: Peter Eisentraut <[email protected]>
1 parent 8a0c254 commit 444b1cd

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

Modules/_blake2/blake2b_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ py_blake2b_dealloc(PyObject *self)
423423
PyTypeObject PyBlake2_BLAKE2bType = {
424424
PyVarObject_HEAD_INIT(NULL, 0)
425425
"_blake2.blake2b", /* tp_name */
426-
sizeof(BLAKE2bObject), /* tp_size */
426+
sizeof(BLAKE2bObject), /* tp_basicsize */
427427
0, /* tp_itemsize */
428428
py_blake2b_dealloc, /* tp_dealloc */
429429
0, /* tp_print */

Modules/_blake2/blake2s_impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ py_blake2s_dealloc(PyObject *self)
423423
PyTypeObject PyBlake2_BLAKE2sType = {
424424
PyVarObject_HEAD_INIT(NULL, 0)
425425
"_blake2.blake2s", /* tp_name */
426-
sizeof(BLAKE2sObject), /* tp_size */
426+
sizeof(BLAKE2sObject), /* tp_basicsize */
427427
0, /* tp_itemsize */
428428
py_blake2s_dealloc, /* tp_dealloc */
429429
0, /* tp_print */

Modules/_sha3/sha3module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ static PyGetSetDef SHA3_getseters[] = {
505505
static PyTypeObject type_obj = { \
506506
PyVarObject_HEAD_INIT(NULL, 0) \
507507
type_name, /* tp_name */ \
508-
sizeof(SHA3object), /* tp_size */ \
508+
sizeof(SHA3object), /* tp_basicsize */ \
509509
0, /* tp_itemsize */ \
510510
/* methods */ \
511511
(destructor)SHA3_dealloc, /* tp_dealloc */ \

Modules/_threadmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static PyMethodDef lock_methods[] = {
234234
static PyTypeObject Locktype = {
235235
PyVarObject_HEAD_INIT(&PyType_Type, 0)
236236
"_thread.lock", /*tp_name*/
237-
sizeof(lockobject), /*tp_size*/
237+
sizeof(lockobject), /*tp_basicsize*/
238238
0, /*tp_itemsize*/
239239
/* methods */
240240
(destructor)lock_dealloc, /*tp_dealloc*/
@@ -495,7 +495,7 @@ static PyMethodDef rlock_methods[] = {
495495
static PyTypeObject RLocktype = {
496496
PyVarObject_HEAD_INIT(&PyType_Type, 0)
497497
"_thread.RLock", /*tp_name*/
498-
sizeof(rlockobject), /*tp_size*/
498+
sizeof(rlockobject), /*tp_basicsize*/
499499
0, /*tp_itemsize*/
500500
/* methods */
501501
(destructor)rlock_dealloc, /*tp_dealloc*/

Modules/md5module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ static PyGetSetDef MD5_getseters[] = {
466466
static PyTypeObject MD5type = {
467467
PyVarObject_HEAD_INIT(NULL, 0)
468468
"_md5.md5", /*tp_name*/
469-
sizeof(MD5object), /*tp_size*/
469+
sizeof(MD5object), /*tp_basicsize*/
470470
0, /*tp_itemsize*/
471471
/* methods */
472472
MD5_dealloc, /*tp_dealloc*/

Modules/mmapmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ To map anonymous memory, pass -1 as the fileno (both versions).");
10081008
static PyTypeObject mmap_object_type = {
10091009
PyVarObject_HEAD_INIT(NULL, 0)
10101010
"mmap.mmap", /* tp_name */
1011-
sizeof(mmap_object), /* tp_size */
1011+
sizeof(mmap_object), /* tp_basicsize */
10121012
0, /* tp_itemsize */
10131013
/* methods */
10141014
(destructor) mmap_object_dealloc, /* tp_dealloc */

Modules/ossaudiodev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ oss_getattro(oss_audio_t *self, PyObject *nameobj)
969969
static PyTypeObject OSSAudioType = {
970970
PyVarObject_HEAD_INIT(&PyType_Type, 0)
971971
"ossaudiodev.oss_audio_device", /*tp_name*/
972-
sizeof(oss_audio_t), /*tp_size*/
972+
sizeof(oss_audio_t), /*tp_basicsize*/
973973
0, /*tp_itemsize*/
974974
/* methods */
975975
(destructor)oss_dealloc, /*tp_dealloc*/
@@ -1001,7 +1001,7 @@ static PyTypeObject OSSAudioType = {
10011001
static PyTypeObject OSSMixerType = {
10021002
PyVarObject_HEAD_INIT(&PyType_Type, 0)
10031003
"ossaudiodev.oss_mixer_device", /*tp_name*/
1004-
sizeof(oss_mixer_t), /*tp_size*/
1004+
sizeof(oss_mixer_t), /*tp_basicsize*/
10051005
0, /*tp_itemsize*/
10061006
/* methods */
10071007
(destructor)oss_mixer_dealloc, /*tp_dealloc*/

Modules/sha1module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ static PyGetSetDef SHA1_getseters[] = {
443443
static PyTypeObject SHA1type = {
444444
PyVarObject_HEAD_INIT(NULL, 0)
445445
"_sha1.sha1", /*tp_name*/
446-
sizeof(SHA1object), /*tp_size*/
446+
sizeof(SHA1object), /*tp_basicsize*/
447447
0, /*tp_itemsize*/
448448
/* methods */
449449
SHA1_dealloc, /*tp_dealloc*/

Modules/sha256module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ static PyMemberDef SHA_members[] = {
530530
static PyTypeObject SHA224type = {
531531
PyVarObject_HEAD_INIT(NULL, 0)
532532
"_sha256.sha224", /*tp_name*/
533-
sizeof(SHAobject), /*tp_size*/
533+
sizeof(SHAobject), /*tp_basicsize*/
534534
0, /*tp_itemsize*/
535535
/* methods */
536536
SHA_dealloc, /*tp_dealloc*/
@@ -564,7 +564,7 @@ static PyTypeObject SHA224type = {
564564
static PyTypeObject SHA256type = {
565565
PyVarObject_HEAD_INIT(NULL, 0)
566566
"_sha256.sha256", /*tp_name*/
567-
sizeof(SHAobject), /*tp_size*/
567+
sizeof(SHAobject), /*tp_basicsize*/
568568
0, /*tp_itemsize*/
569569
/* methods */
570570
SHA_dealloc, /*tp_dealloc*/

Modules/sha512module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ static PyMemberDef SHA_members[] = {
599599
static PyTypeObject SHA384type = {
600600
PyVarObject_HEAD_INIT(NULL, 0)
601601
"_sha512.sha384", /*tp_name*/
602-
sizeof(SHAobject), /*tp_size*/
602+
sizeof(SHAobject), /*tp_basicsize*/
603603
0, /*tp_itemsize*/
604604
/* methods */
605605
SHA512_dealloc, /*tp_dealloc*/
@@ -633,7 +633,7 @@ static PyTypeObject SHA384type = {
633633
static PyTypeObject SHA512type = {
634634
PyVarObject_HEAD_INIT(NULL, 0)
635635
"_sha512.sha512", /*tp_name*/
636-
sizeof(SHAobject), /*tp_size*/
636+
sizeof(SHAobject), /*tp_basicsize*/
637637
0, /*tp_itemsize*/
638638
/* methods */
639639
SHA512_dealloc, /*tp_dealloc*/

0 commit comments

Comments
 (0)