projects
/
ruby-eet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prefer rb_funcall2() over rb_funcall().
[ruby-eet.git]
/
ext
/
ext.c
diff --git
a/ext/ext.c
b/ext/ext.c
index 28bfa4cb1ba52c94263f79cd7dff82fe397d5ec7..e99d41ccf618604a1d9b40413abc1c8d79bf45f4 100644
(file)
--- a/
ext/ext.c
+++ b/
ext/ext.c
@@
-557,13
+557,13
@@
c_to_eet (VALUE self)
long i;
#endif
long i;
#endif
- props = rb_funcall
(self, id_to_eet_properties, 0
);
+ props = rb_funcall
2 (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");
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_funcall
2 (self, id_to_eet_name, 0, NULL
);
StringValue (name);
if (!RSTRING (name)->len ||
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
#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_funcall
2 (props, id_keys, 0, NULL
));
for (i = 0; i < keys->len; i++)
for_each_prop (keys->ptr[i],
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);
chunk = rb_class_new_instance (2, args, cChunk);
- return rb_funcall
(chunk, id_to_s, 0
);
+ return rb_funcall
2 (chunk, id_to_s, 0, NULL
);
}
static VALUE
}
static VALUE
@@
-601,7
+601,7
@@
int_to_eet_chunks (int argc, VALUE *argv, VALUE self)
rb_scan_args (argc, argv, "11", &tag, &type);
rb_scan_args (argc, argv, "11", &tag, &type);
- ary = rb_ary_new
3 (1,
self);
+ ary = rb_ary_new
4 (1, &
self);
if (type == sym_char)
cfmt = "c";
if (type == sym_char)
cfmt = "c";
@@
-614,7
+614,7
@@
int_to_eet_chunks (int argc, VALUE *argv, VALUE self)
args[1] = rb_funcall (ary, id_pack, 1, rb_str_new2 (cfmt));
chunk = rb_class_new_instance (2, args, cChunk);
args[1] = rb_funcall (ary, id_pack, 1, rb_str_new2 (cfmt));
chunk = rb_class_new_instance (2, args, cChunk);
- return rb_ary_new
3 (1,
chunk);
+ return rb_ary_new
4 (1, &
chunk);
}
static VALUE
}
static VALUE
@@
-644,7
+644,7
@@
float_to_eet_chunks (int argc, VALUE *argv, VALUE self)
args[1] = rb_str_new (buf, len);
chunk = rb_class_new_instance (2, args, cChunk);
args[1] = rb_str_new (buf, len);
chunk = rb_class_new_instance (2, args, cChunk);
- return rb_ary_new
3 (1,
chunk);
+ return rb_ary_new
4 (1, &
chunk);
}
void
}
void