From fdf2d1e46f4b6bd08e600b08b8d29ac7f694d2cf Mon Sep 17 00:00:00 2001 From: Scott MacVicar Date: Fri, 19 Dec 2008 02:00:57 +0000 Subject: MFH Add json_last_error() for getting a bit of information about what failed during a decode, also fixes a segfault when we have [1} [DOC] --- ext/json/php_json.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ext/json/php_json.h') diff --git a/ext/json/php_json.h b/ext/json/php_json.h index dfc9427622..8b86a99f71 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -30,6 +30,16 @@ extern zend_module_entry json_module_entry; #include "TSRM.h" #endif +ZEND_BEGIN_MODULE_GLOBALS(json) + int error_code; +ZEND_END_MODULE_GLOBALS(json) + +#ifdef ZTS +# define JSON_G(v) TSRMG(json_globals_id, zend_json_globals *, v) +#else +# define JSON_G(v) (json_globals.v) +#endif + #endif /* PHP_JSON_H */ /* -- cgit v1.2.1