return result;
}
+
static int
+ #if defined(_RL_FUNCTION_TYPEDEF)
on_startup_hook(void)
+ #else
+ on_startup_hook()
+ #endif
{
- return on_hook(startup_hook);
+ int r;
+#ifdef WITH_THREAD
+ PyGILState_STATE gilstate = PyGILState_Ensure();
+#endif
+ r = on_hook(readlinestate_global->startup_hook);
+#ifdef WITH_THREAD
+ PyGILState_Release(gilstate);
+#endif
+ return r;
}
#ifdef HAVE_RL_PRE_INPUT_HOOK
static int
+ #if defined(_RL_FUNCTION_TYPEDEF)
on_pre_input_hook(void)
+ #else
+ on_pre_input_hook()
+ #endif
{
- return on_hook(pre_input_hook);
+ int r;
+#ifdef WITH_THREAD
+ PyGILState_STATE gilstate = PyGILState_Ensure();
+#endif
+ r = on_hook(readlinestate_global->pre_input_hook);
+#ifdef WITH_THREAD
+ PyGILState_Release(gilstate);
+#endif
+ return r;
}
#endif