python
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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 ).
|
||||
|
Reference in New Issue
Block a user