com php-src: Add error codes to php_json.h: ext/json/ph p_json.h
| From: | Jakub Zelenka | Date: | Sun, 16 Nov 2014 15:13:15 +0000 |
| Subject: | com php-src: Add error codes to php_json.h: ext/json/ph p_json.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84730@lists.php.net to get a copy of this message | ||
Commit: 432b73fdee8ae464d1a490a37faa774b850a1534
Author: Jakub Zelenka <bukka@php.net> Sun, 16 Nov 2014 15:13:15 +0000
Parents: d07bf913281058a595e0194076314cd76c0277b6
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=432b73fdee8ae464d1a490a37faa774b850a1534
Log:
Add error codes to php_json.h
Changed paths:
M ext/json/php_json.h
Diff:
diff --git a/ext/json/php_json.h b/ext/json/php_json.h
index 5b2dc12..da6eb12 100644
--- a/ext/json/php_json.h
+++ b/ext/json/php_json.h
@@ -53,6 +53,19 @@ PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_
PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, size_t str_len, zend_long
options, zend_long depth TSRMLS_DC);
extern PHP_JSON_API zend_class_entry *php_json_serializable_ce;
+/* error codes */
+typedef enum {
+ PHP_JSON_ERROR_NONE = 0,
+ PHP_JSON_ERROR_DEPTH,
+ PHP_JSON_ERROR_STATE_MISMATCH,
+ PHP_JSON_ERROR_CTRL_CHAR,
+ PHP_JSON_ERROR_SYNTAX,
+ PHP_JSON_ERROR_UTF8,
+ PHP_JSON_ERROR_RECURSION,
+ PHP_JSON_ERROR_INF_OR_NAN,
+ PHP_JSON_ERROR_UNSUPPORTED_TYPE,
+ PHP_JSON_ERROR_UTF16
+} php_json_error_code;
/* json_encode() options */
#define PHP_JSON_HEX_TAG (1<<0)