31
31
32
32
static const char digits [] = "0123456789abcdef" ;
33
33
34
- static int php_json_escape_string (
34
+ static zend_result php_json_escape_string (
35
35
smart_str * buf , const char * s , size_t len ,
36
36
int options , php_json_encoder * encoder );
37
37
@@ -71,7 +71,7 @@ static inline void php_json_pretty_print_indent(smart_str *buf, int options, php
71
71
72
72
/* }}} */
73
73
74
- static inline int php_json_is_valid_double (double d ) /* {{{ */
74
+ static inline bool php_json_is_valid_double (double d ) /* {{{ */
75
75
{
76
76
return !zend_isinf (d ) && !zend_isnan (d );
77
77
}
@@ -107,7 +107,7 @@ static inline void php_json_encode_double(smart_str *buf, double d, int options)
107
107
} \
108
108
} while (0)
109
109
110
- static int php_json_encode_array (smart_str * buf , zval * val , int options , php_json_encoder * encoder ) /* {{{ */
110
+ static zend_result php_json_encode_array (smart_str * buf , zval * val , int options , php_json_encoder * encoder ) /* {{{ */
111
111
{
112
112
int i , r , need_comma = 0 ;
113
113
HashTable * myht , * prop_ht ;
@@ -312,7 +312,7 @@ static int php_json_encode_array(smart_str *buf, zval *val, int options, php_jso
312
312
}
313
313
/* }}} */
314
314
315
- static int php_json_escape_string (
315
+ static zend_result php_json_escape_string (
316
316
smart_str * buf , const char * s , size_t len ,
317
317
int options , php_json_encoder * encoder ) /* {{{ */
318
318
{
@@ -525,12 +525,12 @@ static int php_json_escape_string(
525
525
}
526
526
/* }}} */
527
527
528
- static int php_json_encode_serializable_object (smart_str * buf , zval * val , int options , php_json_encoder * encoder ) /* {{{ */
528
+ static zend_result php_json_encode_serializable_object (smart_str * buf , zval * val , int options , php_json_encoder * encoder ) /* {{{ */
529
529
{
530
530
zend_class_entry * ce = Z_OBJCE_P (val );
531
531
HashTable * myht = Z_OBJPROP_P (val );
532
532
zval retval , fname ;
533
- int return_code ;
533
+ zend_result return_code ;
534
534
535
535
if (myht && GC_IS_RECURSIVE (myht )) {
536
536
encoder -> error_code = PHP_JSON_ERROR_RECURSION ;
@@ -587,7 +587,7 @@ static int php_json_encode_serializable_object(smart_str *buf, zval *val, int op
587
587
}
588
588
/* }}} */
589
589
590
- static int php_json_encode_serializable_enum (smart_str * buf , zval * val , int options , php_json_encoder * encoder )
590
+ static zend_result php_json_encode_serializable_enum (smart_str * buf , zval * val , int options , php_json_encoder * encoder )
591
591
{
592
592
zend_class_entry * ce = Z_OBJCE_P (val );
593
593
if (ce -> enum_backing_type == IS_UNDEF ) {
@@ -600,7 +600,7 @@ static int php_json_encode_serializable_enum(smart_str *buf, zval *val, int opti
600
600
return php_json_encode_zval (buf , value_zv , options , encoder );
601
601
}
602
602
603
- int php_json_encode_zval (smart_str * buf , zval * val , int options , php_json_encoder * encoder ) /* {{{ */
603
+ zend_result php_json_encode_zval (smart_str * buf , zval * val , int options , php_json_encoder * encoder ) /* {{{ */
604
604
{
605
605
again :
606
606
switch (Z_TYPE_P (val ))
0 commit comments