Moriyoshi Koizumi
moriy****@users*****
2005年 2月 21日 (月) 19:09:41 JST
moriyoshi 05/02/21 19:09:41 Modified: filters Tag: LIBMBFL_1_0 mbfilter_htmlent.c mbfl Tag: LIBMBFL_1_0 mbfl_convert.h Log: - Fix problems in 64bit platforms (PR #30573 - http://bugs.php.net/30573) Revision Changes Path No revision No revision 1.3.2.6 +7 -7 libmbfl/filters/mbfilter_htmlent.c Index: mbfilter_htmlent.c =================================================================== RCS file: /cvsroot/php-i18n/libmbfl/filters/mbfilter_htmlent.c,v retrieving revision 1.3.2.5 retrieving revision 1.3.2.6 diff -u -r1.3.2.5 -r1.3.2.6 --- mbfilter_htmlent.c 20 Feb 2005 16:25:39 -0000 1.3.2.5 +++ mbfilter_htmlent.c 21 Feb 2005 10:09:40 -0000 1.3.2.6 @@ -145,7 +145,7 @@ int mbfl_filt_conv_html_enc_flush(mbfl_convert_filter *filter) { filter->status = 0; - filter->cache = 0; + filter->opaque = NULL; return 0; } @@ -158,24 +158,24 @@ void mbfl_filt_conv_html_dec_ctor(mbfl_convert_filter *filter) { filter->status = 0; - filter->cache = (int)mbfl_malloc(html_enc_buffer_size+1); + filter->opaque = mbfl_malloc(html_enc_buffer_size+1); } void mbfl_filt_conv_html_dec_dtor(mbfl_convert_filter *filter) { filter->status = 0; - if (filter->cache) + if (filter->opaque) { - mbfl_free((void*)filter->cache); + mbfl_free((void*)filter->opaque); } - filter->cache = 0; + filter->opaque = NULL; } int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter) { int pos, ent = 0; mbfl_html_entity_entry *entity; - char *buffer = (char*)filter->cache; + char *buffer = (char*)filter->opaque; if (!filter->status) { if (c == '&' ) { @@ -246,7 +246,7 @@ int status, pos = 0; char *buffer; - buffer = (char*)filter->cache; + buffer = (char*)filter->opaque; status = filter->status; /* flush fragments */ while (status--) { No revision No revision 1.1.2.3 +1 -0 libmbfl/mbfl/mbfl_convert.h Index: mbfl_convert.h =================================================================== RCS file: /cvsroot/php-i18n/libmbfl/mbfl/mbfl_convert.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- mbfl_convert.h 4 Feb 2004 05:56:44 -0000 1.1.2.2 +++ mbfl_convert.h 21 Feb 2005 10:09:40 -0000 1.1.2.3 @@ -51,6 +51,7 @@ const mbfl_encoding *to; int illegal_mode; int illegal_substchar; + void *opaque; }; struct mbfl_convert_vtbl {