We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93be070 commit d4f2c37Copy full SHA for d4f2c37
Include/internal/pycore_stackref.h
@@ -296,6 +296,12 @@ PyStackRef_IsError(_PyStackRef ref)
296
return ref.bits == Py_TAG_INVALID;
297
}
298
299
+static inline bool
300
+PyStackRef_IsMalformed(_PyStackRef ref)
301
+{
302
+ return (ref.bits & Py_TAG_BITS) == Py_TAG_INVALID;
303
+}
304
+
305
static inline bool
306
PyStackRef_IsValid(_PyStackRef ref)
307
{
Python/ceval.c
@@ -160,7 +160,7 @@ dump_item(_PyStackRef item)
160
printf("<NULL>");
161
return;
162
163
- if (PyStackRef_IsError(item)) {
+ if (PyStackRef_IsMalformed(item)) {
164
printf("<INVALID>");
165
166
0 commit comments