Skip to content

Commit 0f2094b

Browse files
committed
Fix compilation errors with build type Debug
1 parent f37d4fc commit 0f2094b

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

graalpython/com.oracle.graal.python.cext/src/abstract.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#if 0 // GraalPy change
1212
#include "pycore_call.h" // _PyObject_CallNoArgs()
1313
#include "pycore_ceval.h" // _Py_EnterRecursiveCallTstate()
14-
#include "pycore_object.h" // _Py_CheckSlotResult()
1514
#endif // GraalPy change
15+
#include "pycore_object.h" // _Py_CheckSlotResult()
1616
#include "pycore_long.h" // _Py_IsNegative
1717
#include "pycore_pyerrors.h" // _PyErr_Occurred()
1818
#include "pycore_pystate.h" // _PyThreadState_GET()

graalpython/com.oracle.graal.python.cext/src/object.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,18 +2882,9 @@ void _Py_SetRefcnt(PyObject* obj, Py_ssize_t cnt) {
28822882
return;
28832883
}
28842884
PyObject *dest;
2885-
if (points_to_py_handle_space(obj))
2886-
{
2885+
if (points_to_py_handle_space(obj)) {
28872886
dest = pointer_to_stub(obj);
2888-
#ifndef NDEBUG
2889-
if (GraalPyPrivate_Debug_CAPI())
2890-
{
2891-
set_PyObject_ob_refcnt(obj, cnt);
2892-
}
2893-
#endif
2894-
}
2895-
else
2896-
{
2887+
} else {
28972888
dest = obj;
28982889
}
28992890
dest->ob_refcnt = cnt;

graalpython/com.oracle.graal.python.cext/src/unicodeobject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12823,7 +12823,9 @@ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
1282312823
if (len == -1)
1282412824
len = strlen(ascii);
1282512825

12826+
#if 0 // GraalPy change
1282612827
assert(ucs1lib_find_max_char((const Py_UCS1*)ascii, (const Py_UCS1*)ascii + len) < 128);
12828+
#endif // GraalPy change
1282712829

1282812830
if (writer->buffer == NULL && !writer->overallocate) {
1282912831
PyObject *str;

0 commit comments

Comments
 (0)