diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | dir.c | 12 |
2 files changed, 13 insertions, 4 deletions
@@ -1,3 +1,8 @@ +Thu Nov 11 17:36:12 2004 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * dir.c (rb_globi): also should call back via rb_glob_caller(). + [ruby-dev:24775] + Thu Nov 11 16:47:21 2004 NAKAMURA Usaku <usa@ruby-lang.org> * test/ruby/test_file.rb (test_truncate_wbuf): we want to test @@ -1099,13 +1099,12 @@ struct rb_glob_args { VALUE arg; }; -static VALUE +static void rb_glob_caller(path, a) VALUE path, a; { struct rb_glob_args *args = (struct rb_glob_args *)a; (*args->func)(RSTRING(path)->ptr, args->arg); - return Qnil; } void @@ -1119,7 +1118,7 @@ rb_glob(path, func, arg) args.func = func; args.arg = arg; - status = rb_glob2(rb_str_new2(path), 0, rb_glob_caller, &args); + status = rb_glob2(rb_str_new2(path), 0, rb_glob_caller, (VALUE)&args); if (status) rb_jump_tag(status); } @@ -1130,7 +1129,12 @@ rb_globi(path, func, arg) void (*func) _((const char*, VALUE)); VALUE arg; { - int status = rb_glob2(path, FNM_CASEFOLD, func, arg); + struct rb_glob_args args; + int status; + + args.func = func; + args.arg = arg; + status = rb_glob2(rb_str_new2(path), FNM_CASEFOLD, rb_glob_caller, (VALUE)&args); if (status) rb_jump_tag(status); } |