summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-12-22 09:01:55 +0000
commit6d583574ab87c7cd18b66382c6892b545167bff6 (patch)
tree515b7c169ce2cd30fe085c5d861f5fad59aa76f7 /dln.c
parente299d511db939232c628d6880e61c32e83937d66 (diff)
1.1d1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1dev@357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 */