Skip to content

Commit 259218a

Browse files
committed
Make sure code compiles for no-debug build
1 parent 3852c28 commit 259218a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ceval_macros.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,12 @@ GETITEM(PyObject *v, Py_ssize_t i) {
212212
#define WITHIN_STACK_BOUNDS() \
213213
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && STACK_LEVEL() <= STACK_SIZE()))
214214

215+
#ifdef Py_DEBUG
215216
#define WITHIN_STACK_BOUNDS_WITH_CACHE() \
216217
(frame->owner == FRAME_OWNED_BY_INTERPRETER || (STACK_LEVEL() >= 0 && (STACK_LEVEL() + current_cached_values) <= STACK_SIZE()))
218+
#else
219+
#define WITHIN_STACK_BOUNDS_WITH_CACHE WITHIN_STACK_BOUNDS
220+
#endif
217221

218222
/* Data access macros */
219223
#define FRAME_CO_CONSTS (_PyFrame_GetCode(frame)->co_consts)

0 commit comments

Comments
 (0)