This commit is contained in:
Vitor Santos Costa
2016-08-23 01:00:14 -05:00
parent 9ed1546ee6
commit 23c1c2d4d7
5 changed files with 25 additions and 15 deletions

View File

@@ -73,7 +73,7 @@ PyObject *term_to_python(term_t t, bool eval) {
return o;
} break;
case PL_STRING: {
char *s;
char *s = NULL;
if (!PL_get_chars(t, &s,
REP_UTF8 | CVT_ATOM | CVT_STRING | BUF_DISCARDABLE)) {
return NULL;

View File

@@ -633,6 +633,7 @@ static int python_import(term_t mname, term_t mod) {
return false;
s = stpcpy(s, sa);
*s++ = '.';
s[0] = '\0';
} else if (!PL_get_nchars(mname, &len, &s,
CVT_ALL | CVT_EXCEPTION | REP_UTF8)) {
return false;

View File

@@ -429,4 +429,4 @@ python_assign_field(C1.E, Obj) :-
python_eval_term(C1, O1),
python_assign_field(O1, E, Obj ).
:- initialization( use_foreign_library(foreign(libpYAPPython), init_python), now ).
:- initialization( use_foreign_library(foreign(libYAPPython), init_python), now ).