diff options
Diffstat (limited to 'ext/json/php_json_encoder.h')
-rw-r--r-- | ext/json/php_json_encoder.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/json/php_json_encoder.h b/ext/json/php_json_encoder.h index 0fec9174b5..68ce8b2de2 100644 --- a/ext/json/php_json_encoder.h +++ b/ext/json/php_json_encoder.h @@ -22,6 +22,19 @@ #include "php.h" #include "zend_smart_str.h" -int php_json_encode_zval(smart_str *buf, zval *val, int options); +typedef struct _php_json_encoder php_json_encoder; + +struct _php_json_encoder { + int depth; + int max_depth; + php_json_error_code error_code; +}; + +static inline void php_json_encode_init(php_json_encoder *encoder) +{ + memset(encoder, 0, sizeof(php_json_encoder)); +} + +int php_json_encode_zval(smart_str *buf, zval *val, int options, php_json_encoder *encoder); #endif /* PHP_JSON_ENCODER_H */ |