return lh_table_length(jso->o.c_object);
}
-size_t json_object_sizeof(void)
+size_t json_c_object_sizeof(void)
{
return sizeof(struct json_object);
}
#define THIS_FUNCTION_IS_DEPRECATED(func) func
#endif
+#ifdef __GNUC__
+#define JSON_C_CONST_FUNCTION(func) func __attribute__((const))
+#else
+#define CONST_FUNCTION(func) func
+#endif
+
#if defined(_MSC_VER)
#define JSON_EXPORT __declspec(dllexport)
#else
/** Get the sizeof (struct json_object).
* @returns a size_t with the sizeof (struct json_object)
*/
-JSON_EXPORT size_t json_object_sizeof(void);
+JSON_C_CONST_FUNCTION(JSON_EXPORT size_t json_c_object_sizeof(void));
/** Add an object field to a json_object of type json_type_object
*