diff options
Diffstat (limited to 'ext/dl/cptr.c')
-rw-r--r-- | ext/dl/cptr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dl/cptr.c b/ext/dl/cptr.c index fe83c7adf6..b947ef27ef 100644 --- a/ext/dl/cptr.c +++ b/ext/dl/cptr.c @@ -430,7 +430,7 @@ rb_dlptr_s_to_ptr(VALUE self, VALUE val) } else if( rb_obj_is_kind_of(val, rb_cString) == Qtrue ){ char *ptr = StringValuePtr(val); - return rb_dlptr_new(ptr, RSTRING(val)->len, NULL); + return rb_dlptr_new(ptr, RSTRING_LEN(val), NULL); } else if( rb_respond_to(val, id_to_ptr) ){ VALUE vptr = rb_funcall(val, id_to_ptr, 0); |