Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- (unknown)
Instance Method Summary collapse
Instance Method Details
#to_ptr ⇒ Object
520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'dl.c', line 520 VALUE rb_str_to_ptr(VALUE self) { char *ptr; int len; len = RSTRING(self)->len; ptr = (char*)dlmalloc(len + 1); memcpy(ptr, RSTRING(self)->ptr, len); ptr[len] = '\0'; return rb_dlptr_new((void*)ptr,len,dlfree); } |