Merge branch 'master' of https://github.com/vscosta/yap-6.3
This commit is contained in:
commit
51359cb175
|
@ -467,7 +467,7 @@ push_registers(Int num_regs, yamop *nextop USES_REGS)
|
||||||
(
|
(
|
||||||
(*curslot < (CELL)LOCAL_GlobalBase &&
|
(*curslot < (CELL)LOCAL_GlobalBase &&
|
||||||
*curslot > (CELL)HR))) {
|
*curslot > (CELL)HR))) {
|
||||||
*curslot++ = TermNil;
|
*curslot++ = TermFreeTerm;
|
||||||
}
|
}
|
||||||
TrailTerm(TR++) = (CELL)curslot++;
|
TrailTerm(TR++) = (CELL)curslot++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,10 @@ protected:
|
||||||
void mk(Term t0); /// internal method to convert from term to handle
|
void mk(Term t0); /// internal method to convert from term to handle
|
||||||
Term gt(); /// get handle and obtain term
|
Term gt(); /// get handle and obtain term
|
||||||
public:
|
public:
|
||||||
virtual ~YAPTerm(){};
|
virtual ~YAPTerm(){ LOCAL_HandleBase[t] = TermFreeTerm;
|
||||||
|
while ( LOCAL_HandleBase[LOCAL_CurSlot-1] == TermFreeTerm)
|
||||||
|
LOCAL_CurSlot--;
|
||||||
|
}
|
||||||
YAPTerm(Term tn) {
|
YAPTerm(Term tn) {
|
||||||
mk(tn);
|
mk(tn);
|
||||||
} /// private method to convert from Term (internal YAP representation) to
|
} /// private method to convert from Term (internal YAP representation) to
|
||||||
|
|
|
@ -93,7 +93,7 @@ X_API bool init_python(void) {
|
||||||
// wait for YAP_Init
|
// wait for YAP_Init
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
// PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
term_t t = PL_new_term_ref();
|
term_t t = PL_new_term_ref();
|
||||||
if (!Py_IsInitialized()) {
|
if (!Py_IsInitialized()) {
|
||||||
python_in_python = true;
|
python_in_python = true;
|
||||||
|
@ -112,6 +112,6 @@ X_API bool init_python(void) {
|
||||||
PL_reset_term_refs(t);
|
PL_reset_term_refs(t);
|
||||||
install_pypreds();
|
install_pypreds();
|
||||||
install_pl2pl();
|
install_pl2pl();
|
||||||
PyGILState_Release(gstate);
|
//PyGILState_Release(gstate);
|
||||||
return !python_in_python;
|
return !python_in_python;
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue