* ruby.h, dir.c (rb_glob): add const.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ocean 2004-02-15 06:34:21 +00:00
parent a4eb11ac44
commit 30fd29a174
3 changed files with 14 additions and 10 deletions

View File

@ -1,3 +1,7 @@
Sun Feb 15 15:23:29 2004 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* ruby.h, dir.c (rb_glob): add const.
Sun Feb 15 01:46:05 2004 GOTOU Yuuzou <gotoyuzo@notwork.org> Sun Feb 15 01:46:05 2004 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/mkmf.rb: absolute path of ruby is assigned to $(RUBY). * lib/mkmf.rb: absolute path of ruby is assigned to $(RUBY).

18
dir.c
View File

@ -914,10 +914,10 @@ do_opendir(path)
/* Return nonzero if S has any special globbing chars in it. */ /* Return nonzero if S has any special globbing chars in it. */
static int static int
has_magic(s, flags) has_magic(s, flags)
char *s; const char *s;
int flags; int flags;
{ {
register char *p = s; register const char *p = s;
register char c; register char c;
int open = 0; int open = 0;
int escape = !(flags & FNM_NOESCAPE); int escape = !(flags & FNM_NOESCAPE);
@ -1311,7 +1311,7 @@ rb_glob2(path, flags, func, arg)
void void
rb_glob(path, func, arg) rb_glob(path, func, arg)
char *path; const char *path;
void (*func) _((const char*, VALUE)); void (*func) _((const char*, VALUE));
VALUE arg; VALUE arg;
{ {
@ -1336,7 +1336,7 @@ push_pattern(path, ary)
static void static void
push_globs(ary, s, flags) push_globs(ary, s, flags)
VALUE ary; VALUE ary;
char *s; const char *s;
int flags; int flags;
{ {
rb_glob2(s, flags, push_pattern, ary); rb_glob2(s, flags, push_pattern, ary);
@ -1345,12 +1345,12 @@ push_globs(ary, s, flags)
static void static void
push_braces(ary, s, flags) push_braces(ary, s, flags)
VALUE ary; VALUE ary;
char *s; const char *s;
int flags; int flags;
{ {
char *buf; char *buf;
char *p, *t, *b; const char *p, *t, *b;
char *lbrace, *rbrace; const char *lbrace, *rbrace;
int nest = 0; int nest = 0;
p = s; p = s;
@ -1400,9 +1400,9 @@ rb_push_glob(str, flags)
VALUE str; VALUE str;
int flags; int flags;
{ {
char *p, *pend; const char *p, *pend;
char *buf; char *buf;
char *t; const char *t;
int nest, maxnest; int nest, maxnest;
int escape = !(flags & FNM_NOESCAPE); int escape = !(flags & FNM_NOESCAPE);
VALUE ary; VALUE ary;

2
ruby.h
View File

@ -468,7 +468,7 @@ struct RBignum {
void rb_obj_infect _((VALUE,VALUE)); void rb_obj_infect _((VALUE,VALUE));
void rb_glob _((char*,void(*)(const char*,VALUE),VALUE)); void rb_glob _((const char*,void(*)(const char*,VALUE),VALUE));
VALUE rb_define_class _((const char*,VALUE)); VALUE rb_define_class _((const char*,VALUE));
VALUE rb_define_module _((const char*)); VALUE rb_define_module _((const char*));