summaryrefslogtreecommitdiff
path: root/ext/json/php_json.h
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2008-12-19 02:00:57 +0000
committerScott MacVicar <scottmac@php.net>2008-12-19 02:00:57 +0000
commitfdf2d1e46f4b6bd08e600b08b8d29ac7f694d2cf (patch)
tree5fa918740a3b319290d04df43367084abfcd3421 /ext/json/php_json.h
parentc310143ac7b06b7e778a99d26ee2690c7e4ea33c (diff)
downloadphp-git-fdf2d1e46f4b6bd08e600b08b8d29ac7f694d2cf.tar.gz
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]
Diffstat (limited to 'ext/json/php_json.h')
-rw-r--r--ext/json/php_json.h10
1 files changed, 10 insertions, 0 deletions
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 */
/*