Skip to content

Commit b3417f9

Browse files
committed
Fix compilation errors in C API debug build
1 parent 2569a57 commit b3417f9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

graalpython/com.oracle.graal.python.cext/include/internal/pycore_pyerrors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static inline PyObject* _PyErr_Occurred(PyThreadState *tstate)
2626
{
2727
assert(tstate != NULL);
2828
// GraalPy change
29-
assert(tstate->curexc_type == _PyTruffleErr_Occurred(tstate));
29+
assert(tstate->curexc_type == Graal_PyTruffleErr_Occurred(tstate));
3030
return tstate->curexc_type;
3131
}
3232

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ _Py_CheckSlotResult(PyObject *obj, const char *slot_name, int success)
116116
/* --- Core PyObject call functions ------------------------------- */
117117

118118
// GraalPy addition
119-
inline int is_single_arg(const char* fmt) {
119+
static inline int is_single_arg(const char* fmt) {
120120
if (fmt[0] == 0) {
121121
return 0;
122122
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ skip_signature(const char *doc)
140140
return NULL;
141141
}
142142

143-
#if 0 // GraalPy change
144143
int
145144
_PyType_CheckConsistency(PyTypeObject *type)
146145
{
147146
#define CHECK(expr) \
148147
do { if (!(expr)) { _PyObject_ASSERT_FAILED_MSG((PyObject *)type, Py_STRINGIFY(expr)); } } while (0)
149148

149+
#if 0 // GraalPy change
150150
CHECK(!_PyObject_IsFreed((PyObject *)type));
151151

152152
if (!(type->tp_flags & Py_TPFLAGS_READY)) {
@@ -170,11 +170,11 @@ _PyType_CheckConsistency(PyTypeObject *type)
170170
CHECK(type->tp_new == NULL);
171171
CHECK(PyDict_Contains(type->tp_dict, &_Py_ID(__new__)) == 0);
172172
}
173+
#endif // GraalPy change
173174

174175
return 1;
175176
#undef CHECK
176177
}
177-
#endif // GraalPy change
178178

179179
static const char *
180180
_PyType_DocWithoutSignature(const char *name, const char *internal_doc)
@@ -3654,7 +3654,7 @@ PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases)
36543654
}
36553655
}
36563656

3657-
// assert(_PyType_CheckConsistency(type));
3657+
assert(_PyType_CheckConsistency(type));
36583658
return (PyObject*)res;
36593659

36603660
fail:
@@ -6500,7 +6500,7 @@ int
65006500
PyType_Ready(PyTypeObject *type)
65016501
{
65026502
if (type->tp_flags & Py_TPFLAGS_READY) {
6503-
// assert(_PyType_CheckConsistency(type));
6503+
assert(_PyType_CheckConsistency(type));
65046504
return 0;
65056505
}
65066506
_PyObject_ASSERT((PyObject *)type,

0 commit comments

Comments
 (0)