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

ruby-changes:16941

From: naruse <ko1@a...>
Date: Mon, 9 Aug 2010 14:11:22 +0900 (JST)
Subject: [ruby-changes:16941] Ruby:r28937 (trunk): * ext/nkf/nkf-utf8/nkf.c: Fix type of mimeout_state.buf.

naruse	2010-08-09 14:11:04 +0900 (Mon, 09 Aug 2010)

  New Revision: 28937

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

  Log:
    * ext/nkf/nkf-utf8/nkf.c: Fix type of mimeout_state.buf.
      [nkf-bug:20079]

  Modified files:
    trunk/ChangeLog
    trunk/ext/nkf/nkf-utf8/nkf.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 28936)
+++ ChangeLog	(revision 28937)
@@ -1,3 +1,8 @@
+Mon Aug  9 14:10:06 2010  NARUSE, Yui  <naruse@r...>
+
+	* ext/nkf/nkf-utf8/nkf.c: Fix type of mimeout_state.buf.
+	  [nkf-bug:20079]
+
 Mon Aug  9 06:52:59 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* dir.c (sys_warning_1): show error message.
Index: ext/nkf/nkf-utf8/nkf.c
===================================================================
--- ext/nkf/nkf-utf8/nkf.c	(revision 28936)
+++ ext/nkf/nkf-utf8/nkf.c	(revision 28937)
@@ -21,7 +21,7 @@
  * 3. This notice may not be removed or altered from any source distribution.
  */
 #define NKF_VERSION "2.1.1"
-#define NKF_RELEASE_DATE "2010-04-28"
+#define NKF_RELEASE_DATE "2010-08-08"
 #define COPY_RIGHT \
     "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa).\n" \
     "Copyright (C) 1996-2010, The nkf Project."
@@ -4635,7 +4635,7 @@
 
 #define MIMEOUT_BUF_LENGTH 74
 static struct {
-    char buf[MIMEOUT_BUF_LENGTH+1];
+    unsigned char buf[MIMEOUT_BUF_LENGTH+1];
     int count;
 } mimeout_state;
 
@@ -4947,7 +4947,7 @@
 		    i = 0;
 
 		    for (; i < mimeout_state.count - len; ++i) {
-			if (!strncmp(mimeout_state.buf+i, str, len)) {
+			if (!strncmp((char *)(mimeout_state.buf+i), str, len)) {
 			    i += len - 2;
 			    break;
 			}

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

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