Skip to content

Commit 65e0b6f

Browse files
committed
Provide empty impl of PyTruffle_ToNaive for CPython
1 parent a8c1090 commit 65e0b6f

File tree

1 file changed

+7
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+7
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_misc.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,15 @@ def compile_module(self, name):
236236
(123.0, ),
237237
),
238238
code="""
239+
#ifdef GRAALVM_PYTHON
239240
// internal function defined in 'capi.c'
240241
int PyTruffle_ToNative(void *);
242+
#else
243+
// nothing to do on CPython
244+
static inline int PyTruffle_ToNative(void *arg) {
245+
return 0;
246+
}
247+
#endif
241248
242249
PyObject* primitive_sharing(PyObject* val) {
243250
Py_ssize_t val_refcnt = Py_REFCNT(val);

0 commit comments

Comments
 (0)