From: Roland A. <rol...@gm...> - 2003-09-28 17:10:48
|
Hello, I think there is a bug in the function update_library in defined in file foreign.d: At the end of the while loop one has to insert lib_list = Cdr(lib_list); otherwise this function(namely the wile loop) does not terminate. Right now if a foreign function is defined with the (:library ...) clause and then an image is saved, calling the foreign function function in a session with this saved image does not terminate, since update_library is called for the library. bye, Roland have a look: /* update the DLL pointer and all related objects acons = (library fpointer object1 object2 ...) */ local void update_library (object acons, uintL version) { var object lib_name = Car(acons); var object lib_addr = Car(Cdr(acons)); /* presumably invalid */ var void *lib_handle = open_library(lib_name,version); TheFpointer(lib_addr)->fp_pointer = lib_handle; mark_fp_valid(TheFpointer(lib_addr)); #if !defined(AMIGAOS) var object lib_list = Cdr(Cdr(acons)); while (consp(lib_list)) { var object fo = Car(lib_list); /* foreign object */ var object fa = foreign_address(fo,false); /* its foreign address */ var gcv_object_t *fn; /* its name */ switch (Record_type(fo)) { case Rectype_Fvariable: fn = &(TheFvariable(fo)->fv_name); break; case Rectype_Ffunction: fn = &(TheFfunction(fo)->ff_name); break; default: NOTREACHED; } ASSERT(eq(TheFaddress(fa)->fa_base,lib_addr)); TheFaddress(fa)->fa_offset = (sintP)object_handle(acons,fn,false) - (sintP)lib_handle; } #endif } -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ |