From: Eric Haszlakiewicz Date: Sun, 9 Jul 2017 01:24:55 +0000 (-0400) Subject: Merge pull request #319 from Dashlane/visual-studio-build X-Git-Tag: json-c-0.13-20171207~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4deed587e7c7dd524d8dbb33c5de2c9d4b5b57f5;p=json-c Merge pull request #319 from Dashlane/visual-studio-build Windows: Fix dynamic library build with Visual Studio --- 4deed587e7c7dd524d8dbb33c5de2c9d4b5b57f5 diff --cc json_object.h index e3da64b,f6a86b0..4bbc367 --- a/json_object.h +++ b/json_object.h @@@ -762,23 -752,8 +768,23 @@@ JSON_EXPORT struct json_object* json_ob * @param d the numeric value of the double. * @param ds the string representation of the double. This will be copied. */ - extern struct json_object* json_object_new_double_s(double d, const char *ds); + JSON_EXPORT struct json_object* json_object_new_double_s(double d, const char *ds); +/** + * Set a global or thread-local json-c option, depending on whether + * JSON_C_OPTION_GLOBAL or JSON_C_OPTION_THREAD is passed. + * Thread-local options default to undefined, and inherit from the global + * value, even if the global value is changed after the thread is created. + * Attempting to set thread-local options when threading is not compiled in + * will result in an error. Be sure to check the return value. + * + * double_format is a "%g" printf format, such as "%.20g" + * + * @return -1 on errors, 0 on success. + */ +int json_c_set_serialization_double_format(const char *double_format, int global_or_thread); + + /** Serialize a json_object of type json_type_double to a string. *