diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-12 05:15:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-12 05:15:18 +0000 |
commit | 3c1fca24e2e6fc695711838a8f681132ad7bdbca (patch) | |
tree | da2604f013ff21165f240f69645e1f443c299662 | |
parent | 0bf6ed0fc8d7871531d44d238aa1a734667c300f (diff) | |
download | ruby-3c1fca24e2e6fc695711838a8f681132ad7bdbca.tar.gz |
* ext/dl/cptr.c (rb_dlptr_s_to_ptr): fixed shadowing variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/dl/cptr.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Tue Aug 12 14:15:13 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fixed shadowing variable. + Tue Aug 12 10:18:01 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * test/win32ole/test_err_in_callback.rb: do not require 'mkmf' diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c index b5f1e239e4..7487b0cf55 100644 --- a/ext/dl/cptr.c +++ b/ext/dl/cptr.c @@ -426,8 +426,8 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val) ptr = rb_dlptr_new(fp, 0, NULL); } else if (rb_obj_is_kind_of(val, rb_cString) == Qtrue){ - char *ptr = StringValuePtr(val); - ptr = rb_dlptr_new(ptr, RSTRING_LEN(val), NULL); + char *str = StringValuePtr(val); + ptr = rb_dlptr_new(str, RSTRING_LEN(val), NULL); } else if (rb_respond_to(val, id_to_ptr)){ VALUE vptr = rb_funcall(val, id_to_ptr, 0); |