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

ruby-changes:42805

From: nobu <ko1@a...>
Date: Mon, 2 May 2016 08:10:01 +0900 (JST)
Subject: [ruby-changes:42805] nobu:r54879 (trunk): string.c: fix braces

nobu	2016-05-02 09:06:04 +0900 (Mon, 02 May 2016)

  New Revision: 54879

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

  Log:
    string.c: fix braces
    
    * string.c (search_nonascii): fix braces unmatched by a
      preprocessing condition.

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 54878)
+++ string.c	(revision 54879)
@@ -429,8 +429,8 @@ search_nonascii(const char *p, const cha https://github.com/ruby/ruby/blob/trunk/string.c#L429
 # define NONASCII_MASK 0x80808080UL
 #endif
 
+    if (UNALIGNED_WORD_ACCESS || e - p >= SIZEOF_VOIDP) {
 #if !UNALIGNED_WORD_ACCESS
-    if (e - p >= SIZEOF_VOIDP) {
 	if ((uintptr_t)p % SIZEOF_VOIDP) {
 	    int l = SIZEOF_VOIDP - (uintptr_t)p % SIZEOF_VOIDP;
 	    p += l;
@@ -448,8 +448,6 @@ search_nonascii(const char *p, const cha https://github.com/ruby/ruby/blob/trunk/string.c#L448
 	      case 0: break;
 	    }
 	}
-#else
-    {
 #endif
 	s = (const uintptr_t *)p;
 	t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));

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

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