call fixes

This commit is contained in:
Vitor Santos Costa
2019-04-27 11:55:22 -05:00
parent 984cf8a07c
commit 54a222e5df
11 changed files with 251 additions and 185 deletions

View File

@@ -113,7 +113,6 @@ static foreign_t python_is(term_t tobj, term_t tf) {
static foreign_t python_proc(term_t tobj) {
PyObject *o;
term_t lim = python_acquire_GIL();
o = term_to_python(tobj, true, NULL, true);
@@ -237,6 +236,7 @@ static foreign_t python_apply(term_t tin, term_t targs, term_t keywds,
}
static foreign_t assign_python(term_t exp, term_t name) {
printf("A %ld\n", LOCAL_CurSlot);
term_t stackp = python_acquire_GIL();
PyObject *e = term_to_python(exp, true, NULL, true);
@@ -245,6 +245,7 @@ static foreign_t assign_python(term_t exp, term_t name) {
pyErrorAndReturn(false);
}
bool b = python_assign(name, e, NULL);
printf("B %ld\n", LOCAL_CurSlot);
python_release_GIL(stackp);
pyErrorAndReturn(b);
}