diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-21 23:35:11 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-21 23:35:11 +0000 |
| commit | 1619ac8ebc44318fd914dd6d81fa1ab5716bcd6c (patch) | |
| tree | bf7737207505c9003dcde698e1109a8ec775423f | |
| parent | 352dd89d20dda3c0e01b175c5fa03dafde15d17c (diff) | |
| download | ruby-1619ac8ebc44318fd914dd6d81fa1ab5716bcd6c.tar.gz ruby-1619ac8ebc44318fd914dd6d81fa1ab5716bcd6c.tar.xz ruby-1619ac8ebc44318fd914dd6d81fa1ab5716bcd6c.zip | |
* ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after
all argument conversion. fixed: [ruby-dev:25271]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | ext/dl/sym.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Dec 22 08:34:32 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/dl/sym.c (rb_dlsym_initialize): extract internal pointers after + all argument conversion. fixed: [ruby-dev:25271] + Wed Dec 22 00:08:01 2004 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> * lib/soap/*, test/soap/*, sample/soap/authheader/*: eval cleanup. diff --git a/ext/dl/sym.c b/ext/dl/sym.c index c2f5434c6..59a618496 100644 --- a/ext/dl/sym.c +++ b/ext/dl/sym.c @@ -154,8 +154,9 @@ rb_dlsym_initialize(int argc, VALUE argv[], VALUE self) rb_scan_args(argc, argv, "12", &addr, &name, &type); saddr = (void*)(DLNUM2LONG(rb_Integer(addr))); - sname = NIL_P(name) ? NULL : StringValuePtr(name); + if (!NIL_P(name)) StringValue(name); stype = NIL_P(type) ? NULL : StringValuePtr(type); + sname = NIL_P(name) ? NULL : RSTRING(name)->ptr; if( saddr ){ Data_Get_Struct(self, struct sym_data, data); |
