mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* dln.c (dln_load): check imported addresses only when compiled
for ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b45f04a66f
commit
d62a9f00b8
1 changed files with 2 additions and 0 deletions
2
dln.c
2
dln.c
|
@ -1265,11 +1265,13 @@ dln_load(const char *file)
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined _WIN32 && defined RUBY_EXPORT
|
||||||
if (!rb_w32_check_imported(handle, rb_libruby_handle())) {
|
if (!rb_w32_check_imported(handle, rb_libruby_handle())) {
|
||||||
FreeLibrary(handle);
|
FreeLibrary(handle);
|
||||||
error = "incompatible library version";
|
error = "incompatible library version";
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
|
if ((init_fct = (void(*)())GetProcAddress(handle, buf)) == NULL) {
|
||||||
dln_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
|
dln_loaderror("%s - %s\n%s", dln_strerror(), buf, file);
|
||||||
|
|
Loading…
Reference in a new issue