Skip to content

Commit

Permalink
Make the json_tokener_errors array local. It has been deprecated for …
Browse files Browse the repository at this point in the history
…a while, and json_tokener_error_desc() should be used instead.
  • Loading branch information
hawicz committed Mar 23, 2014
1 parent 936d036 commit f9136f6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions json_tokener.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 0 additions & 8 deletions json_tokener.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f9136f6

Please sign in to comment.