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

ruby-changes:5874

From: mame <ko1@a...>
Date: Tue, 17 Jun 2008 22:08:36 +0900 (JST)
Subject: [ruby-changes:5874] Ruby:r17381 (trunk): * enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int)

mame	2008-06-17 22:06:34 +0900 (Tue, 17 Jun 2008)

  New Revision: 17381

  Modified files:
    trunk/ChangeLog
    trunk/enc/euc_jp.c
    trunk/enc/shift_jis.c
    trunk/enc/unicode.c

  Log:
    * enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int)
      differs from sizeof(long).
    
    * enc/shift_jis.c (property_name_to_ctype): ditto.
    
    * enc/unicode.c (onigenc_unicode_property_name_to_ctype): ditto.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/unicode.c?r1=17381&r2=17380&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=17381&r2=17380&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/euc_jp.c?r1=17381&r2=17380&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/shift_jis.c?r1=17381&r2=17380&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 17380)
+++ ChangeLog	(revision 17381)
@@ -1,3 +1,12 @@
+Tue Jun 17 22:04:47 2008  Yusuke Endoh  <mame@t...>
+
+	* enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int)
+	  differs from sizeof(long).
+
+	* enc/shift_jis.c (property_name_to_ctype): ditto.
+
+	* enc/unicode.c (onigenc_unicode_property_name_to_ctype): ditto.
+
 Tue Jun 17 20:32:37 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* common.mk (miniruby$(EXEEXT)): $(PREP) isn't always same as
Index: enc/euc_jp.c
===================================================================
--- enc/euc_jp.c	(revision 17380)
+++ enc/euc_jp.c	(revision 17381)
@@ -285,11 +285,11 @@
 static int
 property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
 {
-  int ctype;
+  st_data_t ctype;
 
   PROPERTY_LIST_INIT_CHECK;
 
-  if (onig_st_lookup_strend(PropertyNameTable, p, end, (void*)&ctype) == 0) {
+  if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
     return onigenc_minimum_property_name_to_ctype(enc, p, end);
   }
 
Index: enc/shift_jis.c
===================================================================
--- enc/shift_jis.c	(revision 17380)
+++ enc/shift_jis.c	(revision 17381)
@@ -294,11 +294,11 @@
 static int
 property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
 {
-  int ctype;
+  st_data_t ctype;
 
   PROPERTY_LIST_INIT_CHECK;
 
-  if (onig_st_lookup_strend(PropertyNameTable, p, end, (void*)&ctype) == 0) {
+  if (onig_st_lookup_strend(PropertyNameTable, p, end, &ctype) == 0) {
     return onigenc_minimum_property_name_to_ctype(enc, p, end);
   }
 
Index: enc/unicode.c
===================================================================
--- enc/unicode.c	(revision 17380)
+++ enc/unicode.c	(revision 17381)
@@ -10817,7 +10817,8 @@
 extern int
 onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end)
 {
-  int len, ctype;
+  int len;
+  st_data_t ctype;
   UChar buf[PROPERTY_NAME_MAX_SIZE];
   UChar *p;
   OnigCodePoint code;
@@ -10841,7 +10842,7 @@
   if (NameTableInited == 0)  init_name_ctype_table();
 
   if (onig_st_lookup_strend(NameCtypeTable, buf, buf + len,
-			    (void*)&ctype) == 0) {
+			    &ctype) == 0) {
     return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
   }
 

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

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