Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6695ba8

Browse files
committed
Preserved one bit in type objects for Stackless.
The presence of this bit controls, whether there are special fields for non-recursive calls.
1 parent 5d6ad75 commit 6695ba8

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Include/object.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,13 @@ given type object has a specified feature.
488488
/* Objects support garbage collection (see objimp.h) */
489489
#define Py_TPFLAGS_HAVE_GC (1L<<14)
490490

491+
/* Objects support special, non-recursive calls (reserved for Stackless) */
492+
#ifdef STACKLESS
493+
#define Py_TPFLAGS_HAVE_NR_THINGS (1L<<31)
494+
#else
495+
#define Py_TPFLAGS_HAVE_NR_THINGS 0
496+
#endif
497+
491498
#define Py_TPFLAGS_DEFAULT ( \
492499
Py_TPFLAGS_HAVE_GETCHARBUFFER | \
493500
Py_TPFLAGS_HAVE_SEQUENCE_IN | \
@@ -496,6 +503,7 @@ given type object has a specified feature.
496503
Py_TPFLAGS_HAVE_WEAKREFS | \
497504
Py_TPFLAGS_HAVE_ITER | \
498505
Py_TPFLAGS_HAVE_CLASS | \
506+
Py_TPFLAGS_HAVE_NR_THINGS | \
499507
0)
500508

501509
#define PyType_HasFeature(t,f) (((t)->tp_flags & (f)) != 0)

0 commit comments

Comments
 (0)