diff --git a/include/SWI-Prolog.h b/include/SWI-Prolog.h index 54e2b7bd0..40afe2330 100755 --- a/include/SWI-Prolog.h +++ b/include/SWI-Prolog.h @@ -372,7 +372,7 @@ extern X_API int PL_get_arg(int, term_t, term_t); extern X_API int _PL_get_arg(int, term_t, term_t); extern X_API int PL_get_atom(term_t, atom_t *); extern X_API int PL_get_atom_chars(term_t, char **); -extern X_API int PL_get_atom_nchars(term_t, char **, size_t *); +extern X_API int PL_get_atom_nchars(term_t, size_t *, char **); extern X_API int PL_get_bool(term_t, int *); extern X_API int PL_get_chars(term_t, char **, unsigned); extern X_API int PL_get_nchars(term_t, size_t *, char **, unsigned); diff --git a/library/yap2swi/yap2swi.c b/library/yap2swi/yap2swi.c index 614aaafad..d2368863d 100755 --- a/library/yap2swi/yap2swi.c +++ b/library/yap2swi/yap2swi.c @@ -393,7 +393,7 @@ X_API int PL_get_atom_chars(term_t ts, char **a) /* SAM check type */ /* SWI: int PL_get_atom_chars(term_t t, char **s) YAP: char* AtomName(Atom) */ -X_API int PL_get_atom_nchars(term_t ts, char **s, size_t *len) /* SAM check type */ +X_API int PL_get_atom_nchars(term_t ts, size_t *len, char **s) /* SAM check type */ { Term t = Yap_GetFromSlot(ts); if (!IsAtomTerm(t))