Browse Source

Make the json_tokener_errors array local. It has been deprecated for a while, and json_tokener_error_desc() should be used instead.

tags/json-c-0.12-20140410
Eric Haszlakiewicz 11 years ago
parent
commit
f9136f6852
2 changed files with 1 additions and 10 deletions
  1. +1
    -2
      json_tokener.c
  2. +0
    -8
      json_tokener.h

+ 1
- 2
json_tokener.c View File

@@ -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 char json_false_str[] = "false";
static const int json_false_str_len = sizeof(json_false_str) - 1; 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", "success",
"continue", "continue",
"nesting too deep", "nesting too deep",


+ 0
- 8
json_tokener.h View File

@@ -106,14 +106,6 @@ struct json_tokener
*/ */
const char *json_tokener_error_desc(enum json_tokener_error jerr); 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(), * Retrieve the error caused by the last call to json_tokener_parse_ex(),
* or json_tokener_success if there is no error. * or json_tokener_success if there is no error.


Loading…
Cancel
Save