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

ruby-changes:39988

From: nobu <ko1@a...>
Date: Wed, 7 Oct 2015 17:27:23 +0900 (JST)
Subject: [ruby-changes:39988] nobu:r52069 (trunk): re.c: indent [ci skip]

nobu	2015-10-07 17:26:56 +0900 (Wed, 07 Oct 2015)

  New Revision: 52069

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

  Log:
    re.c: indent [ci skip]
    
    * re.c (onig_new_with_source, rb_reg_search0): adjust indent.

  Modified files:
    trunk/re.c
Index: re.c
===================================================================
--- re.c	(revision 52068)
+++ re.c	(revision 52069)
@@ -835,24 +835,24 @@ rb_reg_named_captures(VALUE re) https://github.com/ruby/ruby/blob/trunk/re.c#L835
 
 static int
 onig_new_with_source(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
-	  OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax,
-	  OnigErrorInfo* einfo, const char *sourcefile, int sourceline)
+		     OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax,
+		     OnigErrorInfo* einfo, const char *sourcefile, int sourceline)
 {
-  int r;
+    int r;
+
+    *reg = (regex_t* )malloc(sizeof(regex_t));
+    if (IS_NULL(*reg)) return ONIGERR_MEMORY;
 
-  *reg = (regex_t* )malloc(sizeof(regex_t));
-  if (IS_NULL(*reg)) return ONIGERR_MEMORY;
+    r = onig_reg_init(*reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax);
+    if (r) goto err;
 
-  r = onig_reg_init(*reg, option, ONIGENC_CASE_FOLD_DEFAULT, enc, syntax);
-  if (r) goto err;
-
-  r = onig_compile(*reg, pattern, pattern_end, einfo, sourcefile, sourceline);
-  if (r) {
-  err:
-    onig_free(*reg);
-    *reg = NULL;
-  }
-  return r;
+    r = onig_compile(*reg, pattern, pattern_end, einfo, sourcefile, sourceline);
+    if (r) {
+      err:
+	onig_free(*reg);
+	*reg = NULL;
+    }
+    return r;
 }
 
 static Regexp*
@@ -1521,7 +1521,7 @@ rb_reg_search0(VALUE re, VALUE str, long https://github.com/ruby/ruby/blob/trunk/re.c#L1521
 	if (err) rb_memerror();
     }
     else {
-	    FL_UNSET(match, FL_TAINT);
+	FL_UNSET(match, FL_TAINT);
     }
 
     if (set_backref_str) {

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

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