1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-12-20 11:30:13 +00:00
parent 3780ede6ef
commit 85ce703fab
3 changed files with 12 additions and 16 deletions

View file

@ -1,10 +1,10 @@
Fri Dec 20 20:19:49 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> Fri Dec 20 20:29:04 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c, * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c, ext/dl/handle.c, ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c,
ext/stringio/stringio.c, ext/strscan/strscan.c, ext/iconv/iconv.c, ext/sdbm/init.c, ext/stringio/stringio.c,
ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c: ext/strscan/strscan.c, ext/tcltklib/tcltklib.c,
use rb_define_alloc_func(). ext/win32ole/win32ole.c: use rb_define_alloc_func().
Fri Dec 20 18:29:04 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net> Fri Dec 20 18:29:04 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>

View file

@ -65,14 +65,12 @@ fdbm_close(obj)
} }
static VALUE static VALUE
fdbm_s_new(argc, argv, klass) fdbm_alloc(argc, argv, klass)
int argc; int argc;
VALUE *argv; VALUE *argv;
VALUE klass; VALUE klass;
{ {
VALUE obj = Data_Wrap_Struct(klass, 0, free_dbm, 0); return Data_Wrap_Struct(klass, 0, free_dbm, 0);
rb_obj_call_init(obj, argc, argv);
return obj;
} }
static VALUE static VALUE
@ -720,7 +718,7 @@ Init_dbm()
rb_eDBMError = rb_define_class("DBMError", rb_eStandardError); rb_eDBMError = rb_define_class("DBMError", rb_eStandardError);
rb_include_module(rb_cDBM, rb_mEnumerable); rb_include_module(rb_cDBM, rb_mEnumerable);
rb_define_singleton_method(rb_cDBM, "new", fdbm_s_new, -1); rb_define_alloc_func(rb_cDBM, fdbm_alloc);
rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1); rb_define_singleton_method(rb_cDBM, "open", fdbm_s_open, -1);
rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1); rb_define_method(rb_cDBM, "initialize", fdbm_initialize, -1);

View file

@ -57,14 +57,12 @@ fsdbm_close(obj)
} }
static VALUE static VALUE
fsdbm_s_new(argc, argv, klass) fsdbm_alloc(argc, argv, klass)
int argc; int argc;
VALUE *argv; VALUE *argv;
VALUE klass; VALUE klass;
{ {
VALUE obj = Data_Wrap_Struct(klass, 0, free_sdbm, 0); return Data_Wrap_Struct(klass, 0, free_sdbm, 0);
rb_obj_call_init(obj, argc, argv);
return obj;
} }
static VALUE static VALUE
@ -719,7 +717,7 @@ Init_sdbm()
rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError); rb_eDBMError = rb_define_class("SDBMError", rb_eStandardError);
rb_include_module(rb_cDBM, rb_mEnumerable); 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_singleton_method(rb_cDBM, "open", fsdbm_s_open, -1);
rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1); rb_define_method(rb_cDBM, "initialize", fsdbm_initialize, -1);