unset var

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1955 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2007-10-15 23:48:46 +00:00
parent 07b18afdf0
commit 3e4e75dbdf
3 changed files with 14 additions and 4 deletions

View File

@ -10,8 +10,11 @@
* File: c_interface.c * * File: c_interface.c *
* comments: c_interface primitives definition * * comments: c_interface primitives definition *
* * * *
* Last rev: $Date: 2007-10-05 18:24:30 $,$Author: vsc $ * * Last rev: $Date: 2007-10-15 23:48:46 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $ * $Log: not supported by cvs2svn $
* Revision 1.97 2007/10/05 18:24:30 vsc
* fix garbage collector and fix LeaveGoal
*
* Revision 1.96 2007/09/04 10:34:54 vsc * Revision 1.96 2007/09/04 10:34:54 vsc
* Improve SWI interface emulation. * Improve SWI interface emulation.
* *
@ -1220,6 +1223,7 @@ YAP_EnterGoal(PredEntry *pe, Term *ptr, YAP_dogoalinfo *dgi)
{ {
UInt i; UInt i;
choiceptr myB; choiceptr myB;
int out;
BACKUP_MACHINE_REGS(); BACKUP_MACHINE_REGS();
dgi->p = P; dgi->p = P;
@ -1249,9 +1253,12 @@ YAP_EnterGoal(PredEntry *pe, Term *ptr, YAP_dogoalinfo *dgi)
#if defined(YAPOR) || defined(THREADS) #if defined(YAPOR) || defined(THREADS)
WPP = NULL; WPP = NULL;
#endif #endif
YENV[E_CB] = Unsigned (B);
ASP = YENV = (CELL *)B; ASP = YENV = (CELL *)B;
return run_emulator(dgi); YENV[E_CB] = Unsigned (B);
fprintf(stderr,"%p--%p\n",B,myB);
out = run_emulator(dgi);
RECOVER_MACHINE_REGS();
return out;
} }
X_API int X_API int

View File

@ -17,6 +17,8 @@
<h2>Yap-5.1.3:</h2> <h2>Yap-5.1.3:</h2>
<ul> <ul>
<li> FIXED: YAP_EnterGoal would set YENV[E_CB] before setting YENV
(obs from Trevor Walker).</li>
<li> FIXED: setarg/3 should always set a global variable.</li> <li> FIXED: setarg/3 should always set a global variable.</li>
<li> NEW: define dialect and version_data flags.</li> <li> NEW: define dialect and version_data flags.</li>
<li> NEW: define __YAP_PROLOG__.</li> <li> NEW: define __YAP_PROLOG__.</li>

View File

@ -13843,7 +13843,8 @@ be be found.
@findex YAP_LeaveGoal/2 @findex YAP_LeaveGoal/2
Exit a query query created by @code{YAP_EnterGoal}. If Exit a query query created by @code{YAP_EnterGoal}. If
@code{backtrack} is @code{TRUE}, variable bindings are undone and Heap @code{backtrack} is @code{TRUE}, variable bindings are undone and Heap
space is recovered. Otherwise, stack space is recovered. space is recovered. Otherwise, only stack space is recovered, ie,
@code{LeaveGoal} executes a cut.
Next, follows an example of how to use @code{YAP_EnterGoal}: Next, follows an example of how to use @code{YAP_EnterGoal}:
@example @example