diff options
Diffstat (limited to 'ext/dl/dl.c')
-rw-r--r-- | ext/dl/dl.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c index cb370ae252..99df0ba193 100644 --- a/ext/dl/dl.c +++ b/ext/dl/dl.c @@ -457,13 +457,7 @@ rb_dl_dlopen(int argc, VALUE argv[], VALUE self) VALUE rb_dl_malloc(VALUE self, VALUE size) { - void *ptr; - long s; - - s = DLNUM2LONG(size); - ptr = dlmalloc((size_t)s); - memset(ptr,0,(size_t)s); - return rb_dlptr_new(ptr, s, dlfree); + return rb_dlptr_malloc(DLNUM2LONG(size), dlfree); } VALUE |