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.
This commit is contained in:
Peter Eisentraut 2018-09-10 18:46:08 +02:00 committed by Benjamin Peterson
parent d545869d08
commit 0e0bc4e221
15 changed files with 21 additions and 21 deletions

View File

@ -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,

View File

@ -398,7 +398,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 */

View File

@ -398,7 +398,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 */

View File

@ -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*/

View File

@ -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 */ \

View File

@ -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*/
@ -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*/

View File

@ -1764,7 +1764,7 @@ PyDoc_STRVAR(channelid_doc,
static PyTypeObject ChannelIDtype = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"_xxsubinterpreters.ChannelID", /* tp_name */
sizeof(channelid), /* tp_size */
sizeof(channelid), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)channelid_dealloc, /* tp_dealloc */
0, /* tp_print */
@ -2173,7 +2173,7 @@ PyDoc_STRVAR(interpid_doc,
static PyTypeObject InterpreterIDtype = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"interpreters.InterpreterID", /* tp_name */
sizeof(interpid), /* tp_size */
sizeof(interpid), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)interpid_dealloc, /* tp_dealloc */
0, /* tp_print */

View File

@ -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*/

View File

@ -983,7 +983,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 */

View File

@ -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*/
@ -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*/

View File

@ -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*/

View File

@ -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*/
@ -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*/

View File

@ -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*/
@ -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*/

View File

@ -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 */
};
@ -790,7 +790,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 */

View File

@ -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 */