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

ruby-changes:42788

From: naruse <ko1@a...>
Date: Sun, 1 May 2016 17:10:39 +0900 (JST)
Subject: [ruby-changes:42788] naruse:r54862 (trunk): Use WORDS_BIGENDIAN

naruse	2016-05-01 18:07:14 +0900 (Sun, 01 May 2016)

  New Revision: 54862

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

  Log:
    Use WORDS_BIGENDIAN

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 54861)
+++ string.c	(revision 54862)
@@ -449,10 +449,10 @@ search_nonascii(const char *p, const cha https://github.com/ruby/ruby/blob/trunk/string.c#L449
 	const uintptr_t *t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));
 	for (;s < t; s++) {
 	    if (*s & NONASCII_MASK) {
-#if BYTE_ORDER == LITTLE_ENDIAN
-		return (const char *)s + (ntz_intptr(*s&NONASCII_MASK)>>3);
-#else
+#ifdef WORDS_BIGENDIAN
 		return (const char *)s + (nlz_intptr(*s&NONASCII_MASK)>>3);
+#else
+		return (const char *)s + (ntz_intptr(*s&NONASCII_MASK)>>3);
 #endif
 	    }
 	}

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

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