@@ -451,7 +451,7 @@ static inline unsigned char unimap_bsearch(const uni_to_enc *table, unsigned cod
451
451
/* }}} */
452
452
453
453
/* {{{ map_from_unicode */
454
- static inline int map_from_unicode (unsigned code , enum entity_charset charset , unsigned * res )
454
+ static inline zend_result map_from_unicode (unsigned code , enum entity_charset charset , unsigned * res )
455
455
{
456
456
unsigned char found ;
457
457
const uni_to_enc * table ;
@@ -667,7 +667,7 @@ static inline int numeric_entity_is_allowed(unsigned uni_cp, int document_type)
667
667
* On input, *buf should point to the first character after # and on output, it's the last
668
668
* byte read, no matter if there was success or insuccess.
669
669
*/
670
- static inline int process_numeric_entity (const char * * buf , unsigned * code_point )
670
+ static inline zend_result process_numeric_entity (const char * * buf , unsigned * code_point )
671
671
{
672
672
zend_long code_l ;
673
673
int hexadecimal = (* * buf == 'x' || * * buf == 'X' ); /* TODO: XML apparently disallows "X" */
@@ -703,7 +703,7 @@ static inline int process_numeric_entity(const char **buf, unsigned *code_point)
703
703
/* }}} */
704
704
705
705
/* {{{ process_named_entity */
706
- static inline int process_named_entity_html (const char * * buf , const char * * start , size_t * length )
706
+ static inline zend_result process_named_entity_html (const char * * buf , const char * * start , size_t * length )
707
707
{
708
708
* start = * buf ;
709
709
@@ -732,7 +732,7 @@ static inline int process_named_entity_html(const char **buf, const char **start
732
732
/* }}} */
733
733
734
734
/* {{{ resolve_named_entity_html */
735
- static int resolve_named_entity_html (const char * start , size_t length , const entity_ht * ht , unsigned * uni_cp1 , unsigned * uni_cp2 )
735
+ static zend_result resolve_named_entity_html (const char * start , size_t length , const entity_ht * ht , unsigned * uni_cp1 , unsigned * uni_cp2 )
736
736
{
737
737
const entity_cp_map * s ;
738
738
zend_ulong hash = zend_inline_hash_func (start , length );
@@ -780,9 +780,7 @@ static inline size_t write_octet_sequence(unsigned char *buf, enum entity_charse
780
780
#if 0
781
781
return php_mb2_int_to_char (buf , code );
782
782
#else
783
- #if ZEND_DEBUG
784
- assert (code <= 0xFFU );
785
- #endif
783
+ ZEND_ASSERT (code <= 0xFFU );
786
784
* buf = code ;
787
785
return 1 ;
788
786
#endif
@@ -791,9 +789,7 @@ static inline size_t write_octet_sequence(unsigned char *buf, enum entity_charse
791
789
#if 0 /* idem */
792
790
return php_mb2_int_to_char (buf , code );
793
791
#else
794
- #if ZEND_DEBUG
795
- assert (code <= 0xFFU );
796
- #endif
792
+ ZEND_ASSERT (code <= 0xFFU );
797
793
* buf = code ;
798
794
return 1 ;
799
795
#endif
0 commit comments