diff --git a/ChangeLog b/ChangeLog index f80a876ace..3c91eafbcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 11 06:54:39 2016 Nobuyoshi Nakada + + * file.c (apply2files): apply to a VALUE vector instead of a + temporary array. + Sun Apr 10 20:54:16 2016 Joe Swatosh * ext/win32/lib/win32/registry.rb (DeleteValue, DeleteKey): fix diff --git a/file.c b/file.c index 901e46a0c2..32add8c056 100644 --- a/file.c +++ b/file.c @@ -334,21 +334,23 @@ ignored_char_p(const char *p, const char *e, rb_encoding *enc) } #endif +#define apply2args(n) (rb_check_arity(argc, n, UNLIMITED_ARGUMENTS), argc-=n) + static long -apply2files(void (*func)(const char *, VALUE, void *), VALUE vargs, void *arg) +apply2files(void (*func)(const char *, VALUE, void *), int argc, VALUE *argv, void *arg) { long i; volatile VALUE path; - for (i=0; i