summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-20 11:23:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-20 11:23:40 +0000
commit3780ede6ef2248effe7f1725cbab052391aefd3f (patch)
tree7bcf8eae31dd7fd935079674077e23ae49e28490 /ext
parent5b615c70eb68177075bf033384499a2eb4b765e6 (diff)
* ext/curses/curses.c, ext/digest/digest.c, ext/dl/handle.c,
ext/dl/ptr.c, ext/dl/sym.c, ext/gdbm/gdbm.c, ext/iconv/iconv.c, ext/stringio/stringio.c, ext/strscan/strscan.c, ext/tcltklib/tcltklib.c, ext/win32ole/win32ole.c: use rb_define_alloc_func(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/curses/curses.c2
-rw-r--r--ext/digest/digest.c2
-rw-r--r--ext/dl/handle.c2
-rw-r--r--ext/dl/ptr.c2
-rw-r--r--ext/dl/sym.c2
-rw-r--r--ext/gdbm/gdbm.c2
-rw-r--r--ext/iconv/iconv.c2
-rw-r--r--ext/stringio/stringio.c2
-rw-r--r--ext/strscan/strscan.c3
-rw-r--r--ext/tcltklib/tcltklib.c2
-rw-r--r--ext/win32ole/win32ole.c8
11 files changed, 14 insertions, 15 deletions
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index aeda267..fa29263 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -1308,7 +1308,7 @@ Init_curses()
#endif /* USE_MOUSE */
cWindow = rb_define_class_under(mCurses, "Window", rb_cData);
- rb_define_singleton_method(cWindow, "allocate", window_s_allocate, 0);
+ rb_define_alloc_func(cWindow, window_s_allocate);
rb_define_method(cWindow, "initialize", window_initialize, 4);
rb_define_method(cWindow, "subwin", window_subwin, 4);
rb_define_method(cWindow, "close", window_close, 0);
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 63a3b92..0d058bb 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -297,7 +297,7 @@ Init_digest()
cDigest_Base = rb_define_class_under(mDigest, "Base", rb_cObject);
- rb_define_singleton_method(cDigest_Base, "allocate", rb_digest_base_alloc, 0);
+ rb_define_alloc_func(cDigest_Base, rb_digest_base_alloc);
rb_define_singleton_method(cDigest_Base, "digest", rb_digest_base_s_digest, 1);
rb_define_singleton_method(cDigest_Base, "hexdigest", rb_digest_base_s_hexdigest, 1);
diff --git a/ext/dl/handle.c b/ext/dl/handle.c
index ea3b98b..b38cecb 100644
--- a/ext/dl/handle.c
+++ b/ext/dl/handle.c
@@ -204,7 +204,7 @@ void
Init_dlhandle()
{
rb_cDLHandle = rb_define_class_under(rb_mDL, "Handle", rb_cObject);
- rb_define_singleton_method(rb_cDLHandle, "allocate", rb_dlhandle_s_allocate, 0);
+ rb_define_alloc_func(rb_cDLHandle, rb_dlhandle_s_allocate);
rb_define_method(rb_cDLHandle, "initialize", rb_dlhandle_initialize, -1);
rb_define_method(rb_cDLHandle, "to_i", rb_dlhandle_to_i, 0);
rb_define_method(rb_cDLHandle, "to_ptr", rb_dlhandle_to_ptr, 0);
diff --git a/ext/dl/ptr.c b/ext/dl/ptr.c
index d90054c..a1e77ca 100644
--- a/ext/dl/ptr.c
+++ b/ext/dl/ptr.c
@@ -1035,7 +1035,7 @@ void
Init_dlptr()
{
rb_cDLPtrData = rb_define_class_under(rb_mDL, "PtrData", rb_cObject);
- rb_define_singleton_method(rb_cDLPtrData, "allocate", rb_dlptr_s_allocate, 0);
+ rb_define_alloc_func(rb_cDLPtrData, rb_dlptr_s_allocate);
rb_define_singleton_method(rb_cDLPtrData, "malloc", rb_dlptr_s_malloc, -1);
rb_define_method(rb_cDLPtrData, "initialize", rb_dlptr_initialize, -1);
rb_define_method(rb_cDLPtrData, "free=", rb_dlptr_free_set, 1);
diff --git a/ext/dl/sym.c b/ext/dl/sym.c
index 7868f07..b5de3b9 100644
--- a/ext/dl/sym.c
+++ b/ext/dl/sym.c
@@ -822,7 +822,7 @@ void
Init_dlsym()
{
rb_cDLSymbol = rb_define_class_under(rb_mDL, "Symbol", rb_cObject);
- rb_define_singleton_method(rb_cDLSymbol, "allocate", rb_dlsym_s_allocate, 0);
+ rb_define_alloc_func(rb_cDLSymbol, rb_dlsym_s_allocate);
rb_define_singleton_method(rb_cDLSymbol, "char2type", rb_s_dlsym_char2type, 1);
rb_define_method(rb_cDLSymbol, "initialize", rb_dlsym_initialize, -1);
rb_define_method(rb_cDLSymbol, "call", rb_dlsym_call, -1);
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 6ee4d6d..143449c 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -921,7 +921,7 @@ Init_gdbm()
rb_eGDBMFatalError = rb_define_class("GDBMFatalError", rb_eException);
rb_include_module(rb_cGDBM, rb_mEnumerable);
- rb_define_singleton_method(rb_cGDBM, "allocate", fgdbm_s_alloc, 0);
+ rb_define_alloc_func(rb_cGDBM, fgdbm_s_alloc);
rb_define_singleton_method(rb_cGDBM, "open", fgdbm_s_open, -1);
rb_define_method(rb_cGDBM, "initialize", fgdbm_initialize, -1);
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index a7b1b41..098ffb0 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -690,7 +690,7 @@ void
Init_iconv _((void))
{
VALUE rb_cIconv = rb_define_class("Iconv", rb_cData);
- rb_define_singleton_method(rb_cIconv, "allocate", iconv_s_allocate, 0);
+ rb_define_alloc_func(rb_cIconv, iconv_s_allocate);
rb_define_singleton_method(rb_cIconv, "open", iconv_s_open, 2);
rb_define_singleton_method(rb_cIconv, "iconv", iconv_s_iconv, -1);
rb_define_method(rb_cIconv, "initialize", iconv_initialize, 2);
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index f0c4af5..6369d10 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -896,7 +896,7 @@ void
Init_stringio()
{
VALUE StringIO = rb_define_class("StringIO", rb_cData);
- rb_define_singleton_method(StringIO, "allocate", strio_s_allocate, 0);
+ rb_define_alloc_func(StringIO, strio_s_allocate);
rb_define_singleton_method(StringIO, "open", strio_s_open, -1);
rb_define_method(StringIO, "initialize", strio_initialize, -1);
rb_enable_super(StringIO, "initialize");
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index fb61ee0..5c30c3c 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -747,8 +747,7 @@ Init_strscan()
rb_obj_freeze(tmp);
rb_const_set(StringScanner, rb_intern("Id"), tmp);
- rb_define_singleton_method(StringScanner, "allocate",
- strscan_s_allocate, 0);
+ rb_define_alloc_func(StringScanner, strscan_s_allocate);
rb_define_private_method(StringScanner, "initialize",
strscan_initialize, -1);
rb_define_singleton_method(StringScanner, "must_C_version",
diff --git a/ext/tcltklib/tcltklib.c b/ext/tcltklib/tcltklib.c
index f4a307c..5e68f04 100644
--- a/ext/tcltklib/tcltklib.c
+++ b/ext/tcltklib/tcltklib.c
@@ -869,7 +869,7 @@ Init_tcltklib()
rb_define_module_function(lib, "get_eventloop_weight",
get_eventloop_weight, 0);
- rb_define_singleton_method(ip, "allocate", ip_alloc, 0);
+ rb_define_alloc_func(ip, ip_alloc);
rb_define_method(ip, "initialize", ip_init, 0);
rb_define_method(ip, "_eval", ip_eval, 1);
rb_define_method(ip, "_toUTF8",ip_toUTF8,2);
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 29be931..1eb09e0 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -5244,7 +5244,7 @@ Init_win32ole()
cWIN32OLE = rb_define_class("WIN32OLE", rb_cObject);
- rb_define_singleton_method(cWIN32OLE, "allocate", fole_s_allocate, 0);
+ rb_define_alloc_func(cWIN32OLE, fole_s_allocate);
rb_define_method(cWIN32OLE, "initialize", fole_initialize, -1);
rb_enable_super(cWIN32OLE, "initialize");
@@ -5314,7 +5314,7 @@ Init_win32ole()
rb_define_singleton_method(cWIN32OLE_TYPE, "ole_classes", foletype_s_ole_classes, 1);
rb_define_singleton_method(cWIN32OLE_TYPE, "typelibs", foletype_s_typelibs, 0);
rb_define_singleton_method(cWIN32OLE_TYPE, "progids", foletype_s_progids, 0);
- rb_define_singleton_method(cWIN32OLE_TYPE, "allocate", foletype_s_allocate, 0);
+ rb_define_alloc_func(cWIN32OLE_TYPE, foletype_s_allocate);
rb_define_method(cWIN32OLE_TYPE, "initialize", foletype_initialize, 2);
rb_enable_super(cWIN32OLE_TYPE, "initialize");
rb_define_method(cWIN32OLE_TYPE, "name", foletype_name, 0);
@@ -5343,7 +5343,7 @@ Init_win32ole()
rb_define_method(cWIN32OLE_VARIABLE, "varkind", folevariable_varkind, 0);
cWIN32OLE_METHOD = rb_define_class("WIN32OLE_METHOD", rb_cObject);
- rb_define_singleton_method(cWIN32OLE_METHOD, "allocate", folemethod_s_allocate, 0);
+ rb_define_alloc_func(cWIN32OLE_METHOD, folemethod_s_allocate);
rb_define_method(cWIN32OLE_METHOD, "initialize", folemethod_initialize, 2);
rb_enable_super(cWIN32OLE_METHOD, "initialize");
@@ -5377,7 +5377,7 @@ Init_win32ole()
cWIN32OLE_EVENT = rb_define_class("WIN32OLE_EVENT", rb_cObject);
- rb_define_singleton_method(cWIN32OLE_EVENT, "allocate", fev_s_allocate, 0);
+ rb_define_alloc_func(cWIN32OLE_EVENT, fev_s_allocate);
rb_define_method(cWIN32OLE_EVENT, "initialize", fev_initialize, -1);
rb_enable_super(cWIN32OLE_EVENT, "initialize");
rb_define_singleton_method(cWIN32OLE_EVENT, "message_loop", fev_s_msg_loop, 0);