summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2014-03-22 21:41:24 -0400
committerEric Haszlakiewicz <erh+git@nimenees.com>2014-03-22 21:41:24 -0400
commitf9136f68520db4761f05810f97922900ba459f46 (patch)
tree782383626e53934a323f187eebdd2c2cb139f4cf
parent936d036ea3cd77cf3215e580f074a4d8d4d1f82c (diff)
downloadjson-c-f9136f68520db4761f05810f97922900ba459f46.tar.gz
Make the json_tokener_errors array local. It has been deprecated for a while, and json_tokener_error_desc() should be used instead.
-rw-r--r--json_tokener.c3
-rw-r--r--json_tokener.h8
2 files changed, 1 insertions, 10 deletions
diff --git a/json_tokener.c b/json_tokener.c
index e4710e4..a1019c0 100644
--- a/json_tokener.c
+++ b/json_tokener.c
@@ -66,8 +66,7 @@ static const int json_true_str_len = sizeof(json_true_str) - 1;
static const char json_false_str[] = "false";
static const int json_false_str_len = sizeof(json_false_str) - 1;
-// XXX after v0.10 this array will become static:
-const char* json_tokener_errors[] = {
+static const char* json_tokener_errors[] = {
"success",
"continue",
"nesting too deep",
diff --git a/json_tokener.h b/json_tokener.h
index 61f73d2..5471d97 100644
--- a/json_tokener.h
+++ b/json_tokener.h
@@ -106,14 +106,6 @@ struct json_tokener
*/
const char *json_tokener_error_desc(enum json_tokener_error jerr);
-/**
- * @b XXX do not use json_tokener_errors directly.
- * After v0.10 this will be removed.
- *
- * See json_tokener_error_desc() instead.
- */
-extern const char* json_tokener_errors[];
-
/**
* Retrieve the error caused by the last call to json_tokener_parse_ex(),
* or json_tokener_success if there is no error.