python support

This commit is contained in:
Vitor Santos Costa
2017-05-27 22:54:00 +01:00
parent 25a2b68b15
commit 0c46c894d3
46 changed files with 273711 additions and 118760 deletions

View File

@@ -629,16 +629,15 @@ PyThreadState *tstate;
static YAP_Int p_python_threaded(void) {
PyErr_Clear();
PyRun_SimpleString("print( \"thread initiated\" )");
// PyEval_ReleaseThread(tstate);
_threaded = true;
// _threaded = true;
// _locked = 0;
pyErrorAndReturn(true, false);
}
static PyGILState_STATE gstate;
term_t python_acquire_GIL(void) {
term_t python_acquire_GIL(void) {
term_t curSlot = 1; //PL_new_term_ref();
if (!_threaded)
pyErrorAndReturn(curSlot, false);