From 85818065583555df66b22428cf372f2c6ac0fde4 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Sun, 4 Jun 2017 18:25:51 +0000 Subject: [PATCH] Make _set_last_err() non-static so it can be used outside of json_util.c --- json_object_private.h | 2 ++ json_util.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/json_object_private.h b/json_object_private.h index 67a77f889e..1fe10be2cd 100644 --- a/json_object_private.h +++ b/json_object_private.h @@ -48,6 +48,8 @@ struct json_object void *_userdata; }; +void _set_last_err(const char *err_fmt, ...); + #ifdef __cplusplus } #endif diff --git a/json_util.c b/json_util.c index b66c3dc310..d7351dd6f9 100644 --- a/json_util.c +++ b/json_util.c @@ -64,7 +64,6 @@ static int sscanf_is_broken = 0; static int sscanf_is_broken_testdone = 0; static void sscanf_is_broken_test(void); -static void _set_last_err(const char *err_fmt, ...); static char _last_err[256] = ""; @@ -75,7 +74,7 @@ const char *json_util_get_last_err() return _last_err; } -static void _set_last_err(const char *err_fmt, ...) +void _set_last_err(const char *err_fmt, ...) { va_list ap; va_start(ap, err_fmt);