move handles to a separate handle stack.

This commit is contained in:
Vitor Santos Costa
2015-01-30 07:25:34 +00:00
parent 9f945c152d
commit 36e4cbf98b
21 changed files with 290 additions and 360 deletions

View File

@@ -48,6 +48,7 @@ p_load_foreign( USES_REGS1 )
Term t, t1;
StringList new;
Int returncode = FALSE;
yhandle_t CurSlot = Yap_StartSlots();
strcpy(LOCAL_ErrorSay,"Invalid arguments");
@@ -81,9 +82,9 @@ p_load_foreign( USES_REGS1 )
/* call the OS specific function for dynamic loading */
if(Yap_LoadForeign(ofiles,libs,InitProcName,&InitProc)==LOAD_SUCCEEDED) {
Int CurSlot = Yap_StartSlots( PASS_REGS1 );
Yap_StartSlots( PASS_REGS1 );
(*InitProc)();
LOCAL_CurSlot = CurSlot;
Yap_CloseSlots(CurSlot PASS_REGS);
returncode = TRUE;
}