We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6ab71c commit 6174e6dCopy full SHA for 6174e6d
lib-rt/librt_internal.h
@@ -42,6 +42,10 @@ static void **NativeInternal_API;
42
static int
43
import_librt_internal(void)
44
{
45
+ PyObject *mod = PyImport_ImportModule("librt.internal");
46
+ if (mod == NULL)
47
+ return -1;
48
+ Py_DECREF(mod); // we import just for the side effect of making the below work.
49
NativeInternal_API = (void **)PyCapsule_Import("librt.internal._C_API", 0);
50
if (NativeInternal_API == NULL)
51
return -1;
0 commit comments