From 5be647689fc52eda1d9f93b4bafa57c384f4c781 Mon Sep 17 00:00:00 2001 From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Mon, 23 Aug 2021 22:46:55 +0300 Subject: [PATCH] =?UTF-8?q?json=5Ferror=5Fmax=20=E2=86=92=20JSON=5FERROR?= =?UTF-8?q?=5FMAX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All caps to clarify its constant nature. Keep lowercase for compatibility. --- json.c | 2 +- json.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/json.c b/json.c index a5e590b1..070ff2bc 100644 --- a/json.c +++ b/json.c @@ -238,7 +238,7 @@ json_value * json_parse_ex (json_settings * settings, size_t length, char * error_buf) { - char error [json_error_max]; + char error [JSON_ERROR_MAX]; const json_char * end; json_value * top, * root, * alloc = 0; json_state state = { 0 }; diff --git a/json.h b/json.h index ab5ec21a..3d8467ae 100644 --- a/json.h +++ b/json.h @@ -258,7 +258,8 @@ typedef struct _json_value json_value * json_parse (const json_char * json, size_t length); -#define json_error_max 128 +#define JSON_ERROR_MAX 128 +#define json_error_max JSON_ERROR_MAX json_value * json_parse_ex (json_settings * settings, const json_char * json, size_t length,