Skip to content

Commit beaa509

Browse files
committed
docs: Better comment for tp_as_async slot
1 parent 87674ec commit beaa509

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Doc/includes/typestruct.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ typedef struct _typeobject {
99
printfunc tp_print;
1010
getattrfunc tp_getattr;
1111
setattrfunc tp_setattr;
12-
PyAsyncMethods *tp_as_async; /* formerly known as tp_compare or tp_reserved */
12+
PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)
13+
or tp_reserved (Python 3) */
1314
reprfunc tp_repr;
1415

1516
/* Method suites for standard classes */

Include/object.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,8 @@ typedef struct _typeobject {
351351
printfunc tp_print;
352352
getattrfunc tp_getattr;
353353
setattrfunc tp_setattr;
354-
PyAsyncMethods *tp_as_async; /* formerly known as tp_compare or tp_reserved */
354+
PyAsyncMethods *tp_as_async; /* formerly known as tp_compare (Python 2)
355+
or tp_reserved (Python 3) */
355356
reprfunc tp_repr;
356357

357358
/* Method suites for standard classes */

0 commit comments

Comments
 (0)