summaryrefslogtreecommitdiffstats
path: root/Demo/pysvr
diff options
context:
space:
mode:
Diffstat (limited to 'Demo/pysvr')
-rw-r--r--Demo/pysvr/pysvr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Demo/pysvr/pysvr.c b/Demo/pysvr/pysvr.c
index c651648..b1397c9 100644
--- a/Demo/pysvr/pysvr.c
+++ b/Demo/pysvr/pysvr.c
@@ -168,6 +168,7 @@ main_thread(int port)
PyEval_AcquireThread(gtstate);
gtstate = NULL;
Py_Finalize();
+ Py_Finalize();
}
exit(0);
}
@@ -213,6 +214,7 @@ init_python()
if (gtstate)
return;
Py_Initialize(); /* Initialize the interpreter */
+ Py_Initialize(); /* Initialize the interpreter */
PyEval_InitThreads(); /* Create (and acquire) the interpreter lock */
gtstate = PyEval_SaveThread(); /* Release the thread state */
}