diff --git a/tests/common.c b/tests/common.c index 9c1a109af7318c77395f8b1167660d21266e31c3..3870896a876275a5061aa1df1760c8348c3e8d57 100644 --- a/tests/common.c +++ b/tests/common.c @@ -22,7 +22,7 @@ #include "common.h" -extern void reset(cJSON *item) +CJSON_PUBLIC(void) reset(cJSON *item) { if ((item != NULL) && (item->child != NULL)) { @@ -40,7 +40,7 @@ extern void reset(cJSON *item) memset(item, 0, sizeof(cJSON)); } -extern char *read_file(const char *filename) +CJSON_PUBLIC(char*) read_file(const char *filename) { FILE *file = NULL; long length = 0; diff --git a/tests/common.h b/tests/common.h index 53173455d6045ae2de5deea8e1b92fe3d354197d..97c09bf23d112c122ed9be27a3834d30e5d97bf0 100644 --- a/tests/common.h +++ b/tests/common.h @@ -25,8 +25,8 @@ #include "../cJSON.c" -extern void reset(cJSON *item); -extern char *read_file(const char *filename); +CJSON_PUBLIC(void) reset(cJSON *item); +CJSON_PUBLIC(char*) read_file(const char *filename); /* assertion helper macros */ #define assert_has_type(item, item_type) TEST_ASSERT_BITS_MESSAGE(0xFF, item_type, item->type, "Item doesn't have expected type.")