diff options
author | Eric Haszlakiewicz <erh+git@nimenees.com> | 2019-09-08 22:42:36 -0400 |
---|---|---|
committer | Eric Haszlakiewicz <erh+git@nimenees.com> | 2019-09-08 22:42:36 -0400 |
commit | eae040a84a479ccad1d1c48314345c51ecf1a4a4 (patch) | |
tree | b6f904ae67aa55863d2c05392c2c66df50175424 /json_util.h | |
parent | 374ffe87c61bff2a230cd84274fe3ca494da4017 (diff) | |
download | json-c-eae040a84a479ccad1d1c48314345c51ecf1a4a4.tar.gz |
Issue #488: use JSON_EXPORT on functions so they are properly exported on Windows.
Diffstat (limited to 'json_util.h')
-rw-r--r-- | json_util.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/json_util.h b/json_util.h index 3e1b294..70a7d56 100644 --- a/json_util.h +++ b/json_util.h @@ -40,7 +40,7 @@ extern "C" { * * Returns NULL on failure. See json_util_get_last_err() for details. */ -extern struct json_object* json_object_from_file(const char *filename); +JSON_EXPORT struct json_object* json_object_from_file(const char *filename); /** * Create a JSON object from already opened file descriptor. @@ -52,7 +52,7 @@ extern struct json_object* json_object_from_file(const char *filename); * * Returns NULL on failure. See json_util_get_last_err() for details. */ -extern struct json_object* json_object_from_fd(int fd); +JSON_EXPORT struct json_object* json_object_from_fd(int fd); /** * Equivalent to: @@ -60,7 +60,7 @@ extern struct json_object* json_object_from_fd(int fd); * * Returns -1 if something fails. See json_util_get_last_err() for details. */ -extern int json_object_to_file(const char *filename, struct json_object *obj); +JSON_EXPORT int json_object_to_file(const char *filename, struct json_object *obj); /** * Open and truncate the given file, creating it if necessary, then @@ -68,7 +68,7 @@ extern int json_object_to_file(const char *filename, struct json_object *obj); * * Returns -1 if something fails. See json_util_get_last_err() for details. */ -extern int json_object_to_file_ext(const char *filename, struct json_object *obj, int flags); +JSON_EXPORT int json_object_to_file_ext(const char *filename, struct json_object *obj, int flags); /** * Convert the json_object to a string and write it to the file descriptor. @@ -80,24 +80,24 @@ extern int json_object_to_file_ext(const char *filename, struct json_object *obj * @param flags flags to pass to json_object_to_json_string_ext() * @return -1 if something fails. See json_util_get_last_err() for details. */ -extern int json_object_to_fd(int fd, struct json_object *obj, int flags); +JSON_EXPORT int json_object_to_fd(int fd, struct json_object *obj, int flags); /** * Return the last error from various json-c functions, including: * json_object_to_file{,_ext}, json_object_to_fd() or * json_object_from_{file,fd}, or NULL if there is none. */ -const char *json_util_get_last_err(void); +JSON_EXPORT const char *json_util_get_last_err(void); -extern int json_parse_int64(const char *buf, int64_t *retval); -extern int json_parse_double(const char *buf, double *retval); +JSON_EXPORT int json_parse_int64(const char *buf, int64_t *retval); +JSON_EXPORT int json_parse_double(const char *buf, double *retval); /** * Return a string describing the type of the object. * e.g. "int", or "object", etc... */ -extern const char *json_type_to_name(enum json_type o_type); +JSON_EXPORT const char *json_type_to_name(enum json_type o_type); #ifdef __cplusplus } |