Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 2cbabcc

Browse files
committed
Add condition to allow compilation on python versions <3.10
1 parent d7ec22a commit 2cbabcc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

native/common/jp_context.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,11 @@ extern "C" JNIEXPORT void JNICALL Java_org_jpype_JPypeSignal_interruptPy
492492
(JNIEnv *env, jclass cls, jint signal)
493493
{
494494
interruptState = 1;
495+
#if PY_MINOR_VERSION<10
496+
PyErr_SetInterrupt();
497+
#else
495498
PyErr_SetInterruptEx((int) signal);
499+
#endif
496500
}
497501

498502
extern "C" JNIEXPORT void JNICALL Java_org_jpype_JPypeSignal_acknowledgePy

0 commit comments

Comments
 (0)