extend SWI interface with PL_toplevel and to handle C++ code.

prolog/0 built-in
fixes to parms.h changes.
This commit is contained in:
Vitor Santos Costa
2009-10-23 16:50:43 +01:00
parent 0179998d60
commit 0ea348c26d
8 changed files with 30 additions and 13 deletions

View File

@@ -2010,6 +2010,11 @@ X_API int PL_call_predicate(module_t ctx, int flags, predicate_t p, term_t t0)
return ret;
}
X_API int PL_toplevel(void)
{
return YAP_RunGoal(MkAtomTerm(Yap_FullLookupAtom("$live")));
}
X_API int PL_call(term_t tp, module_t m)
{
YAP_Term t[2], g;
@@ -2047,12 +2052,12 @@ X_API void PL_register_foreign_in_module(const char *module, const char *name, i
}
}
X_API void PL_register_extensions(PL_extension *ptr)
X_API void PL_register_extensions(const PL_extension *ptr)
{
PL_load_extensions(ptr);
}
X_API void PL_load_extensions(PL_extension *ptr)
X_API void PL_load_extensions(const PL_extension *ptr)
{
/* ignore flags for now */
while(ptr->predicate_name != NULL) {