Skip to content

Commit b491544

Browse files
committed
Remove debug code
1 parent 79ed469 commit b491544

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Include/internal/pycore_interpframe.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ extern "C" {
1818
((int)((IF)->instr_ptr - _PyFrame_GetBytecode((IF))))
1919

2020
static inline PyCodeObject *_PyFrame_GetCode(_PyInterpreterFrame *f) {
21+
assert(!PyStackRef_IsNull(f->f_executable));
2122
PyObject *executable = PyStackRef_AsPyObjectBorrow(f->f_executable);
2223
assert(PyCode_Check(executable));
2324
return (PyCodeObject *)executable;

Include/internal/pycore_stackref.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -506,11 +506,6 @@ PyStackRef_AsPyObjectBorrow(_PyStackRef ref)
506506
return BITS_TO_PTR_MASKED(ref);
507507
}
508508

509-
#ifdef Py_DEBUG
510-
#define PyStackRef_AsPyObjectBorrow(REF) \
511-
(assert(!PyStackRef_IsTaggedInt(REF)), PyStackRef_AsPyObjectBorrow(REF))
512-
#endif
513-
514509
static inline _PyStackRef
515510
PyStackRef_Borrow(_PyStackRef ref)
516511
{

0 commit comments

Comments
 (0)