extend interface with IsTermNIl()

This commit is contained in:
Vítor Santos Costa 2011-10-24 22:46:16 +01:00
parent f6cc9578ae
commit 384ddd84ad
2 changed files with 9 additions and 0 deletions

View File

@ -513,6 +513,7 @@ X_API int STD_PROTO(YAP_ThreadDestroyEngine,(int));
X_API Term STD_PROTO(YAP_MkBlobTerm,(unsigned int)); X_API Term STD_PROTO(YAP_MkBlobTerm,(unsigned int));
X_API void *STD_PROTO(YAP_BlobOfTerm,(Term)); X_API void *STD_PROTO(YAP_BlobOfTerm,(Term));
X_API Term STD_PROTO(YAP_TermNil,(void)); X_API Term STD_PROTO(YAP_TermNil,(void));
X_API int STD_PROTO(YAP_IsTermNil,(Term));
X_API int STD_PROTO(YAP_AtomGetHold,(Atom)); X_API int STD_PROTO(YAP_AtomGetHold,(Atom));
X_API int STD_PROTO(YAP_AtomReleaseHold,(Atom)); X_API int STD_PROTO(YAP_AtomReleaseHold,(Atom));
X_API Agc_hook STD_PROTO(YAP_AGCRegisterHook,(Agc_hook)); X_API Agc_hook STD_PROTO(YAP_AGCRegisterHook,(Agc_hook));
@ -3416,6 +3417,12 @@ YAP_TermNil(void)
return TermNil; return TermNil;
} }
X_API int
YAP_IsTermNil(Term t)
{
return t == TermNil;
}
X_API int X_API int
YAP_AtomGetHold(Atom at) YAP_AtomGetHold(Atom at)
{ {

View File

@ -190,6 +190,8 @@ extern X_API int PROTO(YAP_SkipList,(YAP_Term *, YAP_Term **));
/* Term TailOfTerm(Term) */ /* Term TailOfTerm(Term) */
extern X_API YAP_Term PROTO(YAP_TermNil,(void)); extern X_API YAP_Term PROTO(YAP_TermNil,(void));
extern X_API int PROTO(YAP_IsTermNil,(YAP_Term));
/* YAP_Term MkApplTerm(YAP_Functor f, unsigned int n, YAP_Term[] args) */ /* YAP_Term MkApplTerm(YAP_Functor f, unsigned int n, YAP_Term[] args) */
extern X_API YAP_Term PROTO(YAP_MkApplTerm,(YAP_Functor,unsigned int,YAP_Term *)); extern X_API YAP_Term PROTO(YAP_MkApplTerm,(YAP_Functor,unsigned int,YAP_Term *));