зеркало из https://github.com/github/ruby.git
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
42eabfcca2
Коммит
d7baa40cac
|
@ -1,3 +1,12 @@
|
||||||
|
Tue Jun 17 22:04:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* 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@ruby-lang.org>
|
Tue Jun 17 20:32:37 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (miniruby$(EXEEXT)): $(PREP) isn't always same as
|
* common.mk (miniruby$(EXEEXT)): $(PREP) isn't always same as
|
||||||
|
|
|
@ -285,11 +285,11 @@ init_property_list(void)
|
||||||
static int
|
static int
|
||||||
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
||||||
{
|
{
|
||||||
int ctype;
|
st_data_t ctype;
|
||||||
|
|
||||||
PROPERTY_LIST_INIT_CHECK;
|
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);
|
return onigenc_minimum_property_name_to_ctype(enc, p, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -294,11 +294,11 @@ init_property_list(void)
|
||||||
static int
|
static int
|
||||||
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
property_name_to_ctype(OnigEncoding enc, UChar* p, UChar* end)
|
||||||
{
|
{
|
||||||
int ctype;
|
st_data_t ctype;
|
||||||
|
|
||||||
PROPERTY_LIST_INIT_CHECK;
|
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);
|
return onigenc_minimum_property_name_to_ctype(enc, p, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10817,7 +10817,8 @@ static int init_name_ctype_table(void)
|
||||||
extern int
|
extern int
|
||||||
onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end)
|
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 buf[PROPERTY_NAME_MAX_SIZE];
|
||||||
UChar *p;
|
UChar *p;
|
||||||
OnigCodePoint code;
|
OnigCodePoint code;
|
||||||
|
@ -10841,7 +10842,7 @@ onigenc_unicode_property_name_to_ctype(OnigEncoding enc, UChar* name, UChar* end
|
||||||
if (NameTableInited == 0) init_name_ctype_table();
|
if (NameTableInited == 0) init_name_ctype_table();
|
||||||
|
|
||||||
if (onig_st_lookup_strend(NameCtypeTable, buf, buf + len,
|
if (onig_st_lookup_strend(NameCtypeTable, buf, buf + len,
|
||||||
(void*)&ctype) == 0) {
|
&ctype) == 0) {
|
||||||
return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
|
return ONIGERR_INVALID_CHAR_PROPERTY_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче