Skip to content

Commit 12b961b

Browse files
committed
Turn off Py_STACKREF_DEBUG
1 parent 2bc9ace commit 12b961b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Include/internal/pycore_stackref.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ extern "C" {
55
#endif
66

77
// Define this to get precise tracking of stackrefs.
8-
#define Py_STACKREF_DEBUG 1
8+
// #define Py_STACKREF_DEBUG 1
99

1010
#ifndef Py_BUILD_CORE
1111
# error "this header requires Py_BUILD_CORE define"

Python/optimizer_bytecodes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ dummy_func(void) {
228228
{
229229
assert(PyLong_CheckExact(sym_get_const(left)));
230230
assert(PyLong_CheckExact(sym_get_const(right)));
231-
PyObject *temp = PyNumber_Add(sym_get_const(left), sym_get_const(right));
231+
PyObject *temp = _PyLong_Add((PyLongObject *)sym_get_const(left),
232+
(PyLongObject *)sym_get_const(right));
232233
if (temp == NULL) {
233234
goto error;
234235
}

Tools/cases_generator/generators_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ def stackref_close_specialized(
329329
raise analysis_error("Expected comma", comma)
330330
self.out.emit(comma)
331331
dealloc = next(tkn_iter)
332-
self.out.emit(dealloc)
333332
if dealloc.kind != "IDENTIFIER":
334333
raise analysis_error("Expected identifier", dealloc)
334+
self.out.emit(dealloc)
335335
if name.kind == "IDENTIFIER":
336336
escapes = dealloc.text not in NON_ESCAPING_DEALLOCS
337337
return self.stackref_kill(name, storage, escapes)

0 commit comments

Comments
 (0)