6.2 fix to load_foreign atom.
This commit is contained in:
parent
c6ececc21a
commit
f6de18cb09
@ -90,7 +90,7 @@ p_load_foreign( USES_REGS1 )
|
||||
ForeignObj *f_code = (ForeignObj *)Yap_AllocCodeSpace(sizeof(ForeignObj));
|
||||
f_code->objs = ofiles;
|
||||
f_code->libs = libs;
|
||||
f_code->f = InitProcName;
|
||||
f_code->f = AtomOfTerm(t1);
|
||||
f_code->next = ForeignCodeLoaded;
|
||||
f_code->module = CurrentModule;
|
||||
ForeignCodeLoaded = f_code;
|
||||
@ -248,7 +248,7 @@ Yap_ReOpenLoadForeign(void)
|
||||
YapInitProc InitProc = NULL;
|
||||
|
||||
CurrentModule = f_code->module;
|
||||
if(Yap_ReLoadForeign(f_code->objs,f_code->libs,f_code->f,&InitProc)==LOAD_SUCCEEDED) {
|
||||
if(Yap_ReLoadForeign(f_code->objs,f_code->libs,RepAtom(f_code->f)->StrOfAE,&InitProc)==LOAD_SUCCEEDED) {
|
||||
if (InitProc)
|
||||
(*InitProc)();
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ typedef struct StringListItem {
|
||||
typedef struct ForeignLoadItem {
|
||||
StringList objs;
|
||||
StringList libs;
|
||||
char *f;
|
||||
Atom f;
|
||||
Term module;
|
||||
struct ForeignLoadItem *next;
|
||||
} ForeignObj;
|
||||
|
@ -994,8 +994,9 @@ RestoreForeignCode__( USES_REGS1 )
|
||||
libs->name = AtomAdjust(libs->name);
|
||||
libs = libs->next;
|
||||
}
|
||||
if (f_code->f != NULL)
|
||||
f_code->f = (char *)AddrAdjust((ADDR)f_code->f);
|
||||
if (f_code->f != NULL) {
|
||||
f_code->f = AtomAdjust(f_code->f);
|
||||
}
|
||||
if (f_code->next != NULL)
|
||||
f_code->next = (ForeignObj *)AddrAdjust((ADDR)f_code->next);
|
||||
f_code = f_code->next;
|
||||
|
@ -61,6 +61,7 @@ ground_all_keys([], _).
|
||||
ground_all_keys([V|GVars], AllKeys) :-
|
||||
clpbn:get_atts(V,[key(Key)]),
|
||||
\+ ground(Key), !,
|
||||
wroteln(g:Key),
|
||||
member(Key, AllKeys),
|
||||
ground_all_keys(GVars, AllKeys).
|
||||
ground_all_keys([_V|GVars], AllKeys) :-
|
||||
|
Reference in New Issue
Block a user