From bea131f0bcbf4d61dd5f8d814b865183f8f1b657 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 28 Jun 2016 20:49:38 +0100 Subject: Add return code from json API functions It will allow fix few json bugs in a better way --- ext/json/php_json.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/json/php_json.h') diff --git a/ext/json/php_json.h b/ext/json/php_json.h index d1fabd1e6b..045ca02f4a 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -93,12 +93,12 @@ PHP_JSON_API ZEND_EXTERN_MODULE_GLOBALS(json) ZEND_TSRMLS_CACHE_EXTERN() #endif -PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options); -PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, size_t str_len, zend_long options, zend_long depth); +PHP_JSON_API int php_json_encode(smart_str *buf, zval *val, int options); +PHP_JSON_API int php_json_decode_ex(zval *return_value, char *str, size_t str_len, zend_long options, zend_long depth); -static inline void php_json_decode(zval *return_value, char *str, int str_len, zend_bool assoc, zend_long depth) +static inline int php_json_decode(zval *return_value, char *str, int str_len, zend_bool assoc, zend_long depth) { - php_json_decode_ex(return_value, str, str_len, assoc ? PHP_JSON_OBJECT_AS_ARRAY : 0, depth); + return php_json_decode_ex(return_value, str, str_len, assoc ? PHP_JSON_OBJECT_AS_ARRAY : 0, depth); } -- cgit v1.2.1