From 2a737fe22b909bfe849951e68c76fe67b82b5feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Mon, 5 Nov 2012 13:49:49 +0000 Subject: [PATCH] small speedups --- library/dialect/swi/fli/swi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/dialect/swi/fli/swi.c b/library/dialect/swi/fli/swi.c index f766592ad..0541850ca 100755 --- a/library/dialect/swi/fli/swi.c +++ b/library/dialect/swi/fli/swi.c @@ -397,9 +397,9 @@ X_API int PL_get_integer(term_t ts, int *i) { CACHE_REGS YAP_Term t = Yap_GetFromSlot(ts PASS_REGS); - if (!YAP_IsIntTerm(t) ) + if (IsVarTerm(t) || !IsIntegerTerm(t) ) return 0; - *i = YAP_IntOfTerm(t); + *i = (int)IntegerOfTerm(t); return 1; } @@ -1078,7 +1078,7 @@ X_API int PL_warning(const char *msg, ...) { X_API int PL_unify(term_t t1, term_t t2) { CACHE_REGS - return YAP_Unify(Yap_GetFromSlot(t1 PASS_REGS),Yap_GetFromSlot(t2 PASS_REGS)); + return Yap_unify(Yap_GetFromSlot(t1 PASS_REGS),Yap_GetFromSlot(t2 PASS_REGS)); } /* SWI: int PL_unify_atom(term_t ?t, atom *at)