Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Doc/howto/isolating-extensions.rst
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
  • Loading branch information
encukou and ericsnowcurrently authored Nov 13, 2023
commit 0b01d7821f020c80ea74b885e81fc584853d2cb8
2 changes: 1 addition & 1 deletion Doc/howto/isolating-extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ GC-tracked objects need to be allocated using GC-aware functions.
If you use use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:

- Get and call type's :c:member:`~PyTypeObject.tp_alloc` slot, if possible.
That is, replace ``TYPE *o = PyObject_New(TYPE, typeobj)`` by::
That is, replace ``TYPE *o = PyObject_New(TYPE, typeobj)`` with::

TYPE *o = typeobj->tp_alloc(typeobj, 0);
Comment thread
ericsnowcurrently marked this conversation as resolved.

Expand Down