Skip to content

Commit f420704

Browse files
committed
Revise pycore_stackref.h comments.
Remove comment about "strict stack discipline". Clarify that a stolen reference is invalid afterwards.
1 parent 9e474a9 commit f420704

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Include/internal/pycore_stackref.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ extern "C" {
3232
unboxed integers harder in the future.
3333
3434
Steal means that ownership is transferred to something else. The total
35-
number of references to the object stays the same.
35+
number of references to the object stays the same. The old reference is no
36+
longer valid.
3637
3738
New creates a new reference from the old reference. The old reference
3839
is still valid.
3940
40-
With these 3 API, a strict stack discipline must be maintained. All
41-
_PyStackRef must be operated on by the new reference operations:
41+
All _PyStackRef must be operated on by the new reference operations:
4242
4343
1. DUP
4444
2. CLOSE

0 commit comments

Comments
 (0)