Skip to content

Commit c742d93

Browse files
committed
Fix some outdated references.
1 parent d9de49a commit c742d93

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

peps/pep-0788.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -827,16 +827,16 @@ Using interpreter IDs for reference counting
827827
828828
Some iterations of this API took an ``int64_t interp_id`` parameter instead of
829829
``PyInterpreterState *interp``, because interpreter IDs cannot be concurrently
830-
deleted and cause use-after-free violations. :c:func:`PyInterpreterState_Hold`
831-
fixes this issue anyway, but an interpreter ID does have the benefit of
832-
requiring less magic in the implementation, but has several downsides:
830+
deleted and cause use-after-free violations. The reference counting APIs in
831+
this PEP sidestep this issue anyway, but an interpreter ID have the advantage
832+
of requiring less magic:
833833
834834
- Nearly all existing interpreter APIs already return a :c:type:`PyInterpreterState`
835835
pointer, not an interpreter ID. Functions like
836836
:c:func:`PyThreadState_GetInterpreter` would have to be accompanied by
837837
frustrating calls to :c:func:`PyInterpreterState_GetID`.
838838
- Threads typically take a ``void *arg`` parameter, not an ``int64_t arg``.
839-
As such, passing an interpreter pointer requires much less boilerplate
839+
As such, passing a reference requires much less boilerplate
840840
for the user, because an additional structure definition or heap allocation
841841
would be needed to store the interpreter ID. This is especially an issue
842842
on 32-bit systems, where ``void *`` is too small for an ``int64_t``.
@@ -845,7 +845,7 @@ requiring less magic in the implementation, but has several downsides:
845845
the native thread gets a chance to attach. The problem with using an
846846
interpreter ID is that the reference count has to be "invisible"; it
847847
must be tracked elsewhere in the interpreter, likely being *more*
848-
complex than :c:func:`PyInterpreterState_Hold`. There's also a lack
848+
complex than :c:func:`PyInterpreterRef_Get`. There's also a lack
849849
of intuition that a standalone integer could have such a thing as
850850
a reference count.
851851

0 commit comments

Comments
 (0)