diff --git a/library/dialect/swi/fli/swi.c b/library/dialect/swi/fli/swi.c index 77e3f75ff..5bffd8180 100755 --- a/library/dialect/swi/fli/swi.c +++ b/library/dialect/swi/fli/swi.c @@ -2265,8 +2265,8 @@ PL_discard_foreign_frame(fid_t f) LOCAL_execution = env->old; ASP = LCL0-CurSlot; B = B->cp_b; - EX = NULL; - LOCAL_BallTerm = EX; + //LOCAL_BallTerm = EX; + //EX = NULL; free(env); } @@ -2331,7 +2331,7 @@ X_API void PL_close_query(qid_t qi) { CACHE_REGS EX = NULL; - if (EX && !(qi->flags & (PL_Q_CATCH_EXCEPTION|PL_Q_PASS_EXCEPTION))) { + if (EX && !(qi->flags & (PL_Q_CATCH_EXCEPTION))) { EX = NULL; } /* need to implement backtracking here */ diff --git a/os/pl-ctype.c b/os/pl-ctype.c index 5e5a6d1ce..e8e736265 100644 --- a/os/pl-ctype.c +++ b/os/pl-ctype.c @@ -1,11 +1,10 @@ -/* $Id$ - - Part of SWI-Prolog +/* Part of SWI-Prolog Author: Jan Wielemaker - E-mail: wielemak@science.uva.nl + E-mail: J.Wielemaker@vu.nl WWW: http://www.swi-prolog.org - Copyright (C): 1985-2007, University of Amsterdam + Copyright (C): 1985-2013, University of Amsterdam + VU University Amsterdam This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/os/pl-write.c b/os/pl-write.c index b51ff14d0..322fdd2a4 100644 --- a/os/pl-write.c +++ b/os/pl-write.c @@ -179,9 +179,13 @@ bind_varnames(term_t varnames ARG_LD) Term tv, t2, t1; if (!IsApplTerm(tl)) return FALSE; - if ((f = FunctorOfTerm(tl)) != FunctorEq) + if ((f = FunctorOfTerm(tl)) != FunctorEq) { return FALSE; + } t1 = ArgOfTerm(1, tl); + if (IsVarTerm(t1)) { + return PL_error(NULL, 0, "variable_names", ERR_INSTANTIATION, 0, t1); + } t2 = ArgOfTerm(2, tl); tv = Yap_MkApplTerm(LOCAL_FunctorVar, 1, &t1); if (IsVarTerm(t2)) {