add SWI's PL_get_string
This commit is contained in:
parent
0f241ae87c
commit
8f8ba6221e
@ -502,6 +502,7 @@ extern X_API int PL_thread_at_exit(void (*)(void *), void *, int);
|
||||
extern X_API PL_engine_t PL_create_engine(const PL_thread_attr_t *);
|
||||
extern X_API int PL_destroy_engine(PL_engine_t);
|
||||
extern X_API int PL_set_engine(PL_engine_t,PL_engine_t *);
|
||||
extern X_API int PL_get_string(term_t, char **, size_t *);
|
||||
extern X_API int PL_get_string_chars(term_t, char **, size_t *);
|
||||
extern X_API record_t PL_record(term_t);
|
||||
extern X_API int PL_recorded(record_t, term_t);
|
||||
|
@ -684,6 +684,11 @@ X_API int PL_get_head(term_t ts, term_t h)
|
||||
return 1;
|
||||
}
|
||||
|
||||
X_API int PL_get_string(term_t t, char **s, size_t *len)
|
||||
{
|
||||
return PL_get_string_chars(t, s, len);
|
||||
}
|
||||
|
||||
X_API int PL_get_string_chars(term_t t, char **s, size_t *len)
|
||||
{
|
||||
Term tt = Yap_GetFromSlot(t);
|
||||
|
Reference in New Issue
Block a user