Skip to content

Commit 1448abd

Browse files
committed
No static types
1 parent 22a9bfe commit 1448abd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Doc/howto/abi3t-migration.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,9 @@ custom types no longer works:
411411
int my_data;
412412
} CustomObject;
413413
414-
static PyTypeObject CustomType = {
414+
static PyType_Spec CustomType_spec = {
415415
...
416-
.tp_basicsize = sizeof(CustomObject),
416+
.basicsize = sizeof(CustomObject),
417417
...
418418
};
419419
@@ -441,15 +441,15 @@ and changing the name will highlight the usages as compiler errors.
441441
typing the type name, this won't work. Be extra careful, and consider running
442442
tools to detect undefined behavior.)
443443

444-
Then, to create the class, use *negative* :c:macro:`tp_basicsize` to indicate
444+
Then, to create the class, use *negative* ``basicsize`` to indicate
445445
“extra” storage space rather than *total* instance size:
446446

447447
.. code-block::
448448
:class: good
449449
450-
static PyTypeObject CustomType = {
450+
static PyType_Spec CustomType_spec = {
451451
...
452-
.tp_basicsize = -sizeof(CustomObjectData), /* note the minus sign */
452+
.basicsize = -sizeof(CustomObjectData), /* note the minus sign */
453453
...
454454
};
455455

0 commit comments

Comments
 (0)