summaryrefslogtreecommitdiff
path: root/ext/dl/dl.c
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-20 15:35:48 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-05-20 15:35:48 +0000
commit4bf76b4e6c85db9177f1501843b8161ddfae222b (patch)
tree08d6ffce3fc185927152eed8281407a1f3862826 /ext/dl/dl.c
parenta2db8e72c10c5e5506f18314ac805cd8206a4181 (diff)
rename PtrData::alloc and Struct#alloc to malloc respectively.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/dl.c')
-rw-r--r--ext/dl/dl.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index cb370ae2523..99df0ba193f 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