summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/dln.c b/dln.c
index 418bb6b76e..7488824e36 100644
--- a/dln.c
+++ b/dln.c
@@ -1354,7 +1354,7 @@ dln_load(file)
return ;
}
#else/* OPENSTEP dyld functions */
- {
+ {
int dyld_result ;
NSObjectFileImage obj_file ; /* handle, but not use it */
/* "file" is module file name .
@@ -1363,29 +1363,24 @@ dln_load(file)
void (*init_fct)();
- dyld_result = NSCreateObjectFileImageFromFile( file, &obj_file );
+ dyld_result = NSCreateObjectFileImageFromFile( file, &obj_file );
- if (dyld_result != NSObjectFileImageSuccess)
- {
- LoadError("Failed to load %.200s", file);
- }
-
- NSLinkModule(obj_file, file, Qtrue);
+ if (dyld_result != NSObjectFileImageSuccess) {
+ rb_loaderror("Failed to load %.200s", file);
+ }
+ NSLinkModule(obj_file, file, TRUE);
/* lookup the initial function */
- /*NSIsSymbolNameDefined require function name without "_" */
- if( NSIsSymbolNameDefined( buf + 1 ) )
- {
- LoadError("Failed to lookup Init function %.200s",file);
+ /*NSIsSymbolNameDefined require function name without "_" */
+ if( NSIsSymbolNameDefined( buf + 1 ) ) {
+ rb_loaderror("Failed to lookup Init function %.200s",file);
}
/* NSLookupAndBindSymbol require function name with "_" !! */
-
init_fct = NSAddressOfSymbol( NSLookupAndBindSymbol( buf ) );
(*init_fct)();
-
return ;
}
#endif /* rld or dyld */