summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-11 08:36:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-11 08:36:20 +0000
commit099672568175997a8576744f560cd087f468f4e1 (patch)
tree73cf308b6725590278a458173df523a6e13beff7
parent66d927e308955fd82bd5cbddbe99dfb055d857be (diff)
* dir.c (rb_globi): also should call back via rb_glob_caller().
[ruby-dev:24775] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--dir.c12
2 files changed, 13 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3621d7311d..db32306fb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/dir.c b/dir.c
index 87f1252598..e83435b14d 100644
--- a/dir.c
+++ b/dir.c
@@ -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);
}