about summary refs log tree commit diff stats
path: root/src/plugins/python_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/python_api.c')
-rw-r--r--src/plugins/python_api.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c
index e0d54c1c..01f7f8bd 100644
--- a/src/plugins/python_api.c
+++ b/src/plugins/python_api.c
@@ -872,6 +872,20 @@ python_api_init(void)
 #endif
 }
 
+void
+python_init_prof(void)
+{
+#if PY_MAJOR_VERSION >= 3
+    PyImport_AppendInittab("prof", python_api_init);
+    Py_Initialize();
+    PyEval_InitThreads();
+#else
+    Py_Initialize();
+    PyEval_InitThreads();
+    python_api_init();
+#endif
+}
+
 static char*
 _python_plugin_name(void)
 {