This commit is contained in:
Vitor Santos Costa
2018-07-06 16:51:19 +01:00
parent 3bf897c503
commit 260dcbe754
11 changed files with 50 additions and 37 deletions

View File

@@ -5,9 +5,12 @@ PyObject *py_Main;
void pyErrorHandler__(int line, const char *file, const char *code) {
// this code is called if a Python error is found.
fprintf(stderr, " Python error detcted at %s %s:%d\n\n", code, file, line);
PyErr_Print();
}
//int lvl = push_text_stack();
PyObject *type, *val;
// PyErr_Fetch(&type, &val, NULL);
// PyErr_Print();
// Yap_ThrowError__(file,code,line,0, SYSTEM_ERROR_RUNTIME_PYTHON ,"Python Error %s: %s",PyUnicode_AsUTF8(PyObject_Str(type)), PyUnicode_AsUTF8(PyObject_Str(val)));
};
static foreign_t python_len(term_t tobj, term_t tf) {
Py_ssize_t len;