[前][次][番号順一覧][スレッド一覧]

ruby-changes:38063

From: nobu <ko1@a...>
Date: Wed, 1 Apr 2015 11:42:33 +0900 (JST)
Subject: [ruby-changes:38063] nobu:r50144 (trunk): dir.c: expand ruby_brace_glob0

nobu	2015-04-01 11:42:19 +0900 (Wed, 01 Apr 2015)

  New Revision: 50144

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50144

  Log:
    dir.c: expand ruby_brace_glob0
    
    * dir.c (ruby_brace_glob_with_enc): call ruby_brace_glob_with_enc
      in ruby_brace_glob, and expanded ruby_brace_glob0 which is no
      longer used anywhere else.

  Modified files:
    trunk/dir.c
Index: dir.c
===================================================================
--- dir.c	(revision 50143)
+++ dir.c	(revision 50144)
@@ -2035,12 +2035,12 @@ glob_brace(const char *path, VALUE val, https://github.com/ruby/ruby/blob/trunk/dir.c#L2035
     return ruby_glob0(path, arg->flags, arg->func, arg->value, enc);
 }
 
-static int
-ruby_brace_glob0(const char *str, int flags, ruby_glob_func *func, VALUE arg,
-		 rb_encoding* enc)
+int
+ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
 {
     struct brace_args args;
 
+    flags &= ~GLOB_VERBOSE;
     args.func = func;
     args.value = arg;
     args.flags = flags;
@@ -2050,14 +2050,7 @@ ruby_brace_glob0(const char *str, int fl https://github.com/ruby/ruby/blob/trunk/dir.c#L2050
 int
 ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
 {
-    return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg,
-			    rb_ascii8bit_encoding());
-}
-
-int
-ruby_brace_glob_with_enc(const char *str, int flags, ruby_glob_func *func, VALUE arg, rb_encoding *enc)
-{
-    return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg, enc);
+    return ruby_brace_glob_with_enc(str, flags, func, arg, rb_ascii8bit_encoding());
 }
 
 struct push_glob_args {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]