summaryrefslogtreecommitdiff
path: root/ext/sdbm
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-20 11:30:13 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-20 11:30:13 +0000
commit85ce703fabc94df19aedf130baad81cb4870fa88 (patch)
treeef105fa1c2e025ab18dcf7be8859e8575a690525 /ext/sdbm
parent3780ede6ef2248effe7f1725cbab052391aefd3f (diff)
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/sdbm')
-rw-r--r--ext/sdbm/init.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index 99945d3..81dc59a 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -57,14 +57,12 @@ fsdbm_close(obj)
}
static VALUE
-fsdbm_s_new(argc, argv, klass)
+fsdbm_alloc(argc, argv, klass)
int argc;
VALUE *argv;
VALUE klass;
{
- VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0);
- rb_obj_call_init(obj, argc, argv);
- return obj;
+ return Data_Wrap_Struct(klass, 0, free_sdbm, 0);
}
static VALUE
@@ -719,7 +717,7 @@ Init_sdbm()
rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
rb_include_module(rb_cDBM, rb_mEnumerable);
- rb_define_singleton_method(rb_cDBM, "new", fsdbm_s_new, -1);
+ rb_define_alloc_func(rb_cDBM, fsdbm_alloc);
rb_define_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1);
rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);