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

ruby-changes:42803

From: naruse <ko1@a...>
Date: Mon, 2 May 2016 02:31:06 +0900 (JST)
Subject: [ruby-changes:42803] naruse:r54877 (trunk): fix mixed declaration on non UNALIGNED_WORD_ACCESS

naruse	2016-05-02 03:27:41 +0900 (Mon, 02 May 2016)

  New Revision: 54877

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

  Log:
    fix mixed declaration on non UNALIGNED_WORD_ACCESS

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 54876)
+++ string.c	(revision 54877)
@@ -422,6 +422,7 @@ VALUE rb_fs; https://github.com/ruby/ruby/blob/trunk/string.c#L422
 static inline const char *
 search_nonascii(const char *p, const char *e)
 {
+    const uintptr_t *s, *t;
 #if SIZEOF_VOIDP == 8
 # define NONASCII_MASK 0x8080808080808080ULL
 #elif SIZEOF_VOIDP == 4
@@ -450,8 +451,8 @@ search_nonascii(const char *p, const cha https://github.com/ruby/ruby/blob/trunk/string.c#L451
 #else
     {
 #endif
-	const uintptr_t *s = (const uintptr_t *)p;
-	const uintptr_t *t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));
+	s = (const uintptr_t *)p;
+	t = (const uintptr_t *)(e - (SIZEOF_VOIDP-1));
 	for (;s < t; s++) {
 	    if (*s & NONASCII_MASK) {
 #ifdef WORDS_BIGENDIAN

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

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