diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-25 22:49:20 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-25 22:49:20 +0000 |
commit | 59e4e93ef7b6b7f1536e3c56374cc6b8d74b5d28 (patch) | |
tree | 8ef0ee021c12e0ff884aaa2cc963845ab61fa41e /ext/dl/dl.c | |
parent | 9d818a221ec86fb15bfe696995829807be49a1da (diff) |
* ext/dl: revert dl with libffi because it can't run on mswin now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/dl.c')
-rw-r--r-- | ext/dl/dl.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c index 8f8212015b..9635794883 100644 --- a/ext/dl/dl.c +++ b/ext/dl/dl.c @@ -77,6 +77,19 @@ rb_dl_value2ptr(VALUE self, VALUE val) return PTR2NUM((void*)val); } +static void +rb_dl_init_callbacks(VALUE dl) +{ + static const char cb[] = "dl/callback.so"; + + rb_autoload(dl, rb_intern_const("CdeclCallbackAddrs"), cb); + rb_autoload(dl, rb_intern_const("CdeclCallbackProcs"), cb); +#ifdef FUNC_STDCALL + rb_autoload(dl, rb_intern_const("StdcallCallbackAddrs"), cb); + rb_autoload(dl, rb_intern_const("StdcallCallbackProcs"), cb); +#endif +} + void Init_dl(void) { @@ -94,6 +107,8 @@ Init_dl(void) rb_define_const(rb_mDL, "MAX_CALLBACK", INT2NUM(MAX_CALLBACK)); rb_define_const(rb_mDL, "DLSTACK_SIZE", INT2NUM(DLSTACK_SIZE)); + rb_dl_init_callbacks(rb_mDL); + rb_define_const(rb_mDL, "RTLD_GLOBAL", INT2NUM(RTLD_GLOBAL)); rb_define_const(rb_mDL, "RTLD_LAZY", INT2NUM(RTLD_LAZY)); rb_define_const(rb_mDL, "RTLD_NOW", INT2NUM(RTLD_NOW)); @@ -147,6 +162,4 @@ Init_dl(void) Init_dlhandle(); Init_dlcfunc(); Init_dlptr(); - Init_dlfunction(); - Init_dlclosure(); } |