Prefer rb_funcall2() over rb_funcall(). master
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 8 Apr 2007 12:39:59 +0000 (14:39 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 8 Apr 2007 12:39:59 +0000 (14:39 +0200)
ext/ext.c

index ea620be810658fcf541a5753c73abe1872daffaa..e99d41ccf618604a1d9b40413abc1c8d79bf45f4 100644 (file)
--- a/ext/ext.c
+++ b/ext/ext.c
@@ -557,13 +557,13 @@ c_to_eet (VALUE self)
        long i;
 #endif
 
-       props = rb_funcall (self, id_to_eet_properties, 0);
+       props = rb_funcall2 (self, id_to_eet_properties, 0, NULL);
 
        if (rb_obj_is_kind_of (props, rb_cHash) == Qfalse ||
            !RHASH (props)->tbl->num_entries)
                rb_raise (ePropError, "invalid EET properties");
 
-       name = rb_funcall (self, id_to_eet_name, 0);
+       name = rb_funcall2 (self, id_to_eet_name, 0, NULL);
        StringValue (name);
 
        if (!RSTRING (name)->len ||
@@ -575,7 +575,7 @@ c_to_eet (VALUE self)
 #ifdef HAVE_RB_HASH_FOREACH
        rb_hash_foreach (props, for_each_prop, stream);
 #else
-       keys = RARRAY (rb_funcall (props, id_keys, 0));
+       keys = RARRAY (rb_funcall2 (props, id_keys, 0, NULL));
 
        for (i = 0; i < keys->len; i++)
                for_each_prop (keys->ptr[i],
@@ -590,7 +590,7 @@ c_to_eet (VALUE self)
 
        chunk = rb_class_new_instance (2, args, cChunk);
 
-       return rb_funcall (chunk, id_to_s, 0);
+       return rb_funcall2 (chunk, id_to_s, 0, NULL);
 }
 
 static VALUE