* Fix bug with use of capital E in numbers with exponents
Mateusz Loskot, mateusz at loskot dot net
* Add stddef.h include
+ * Patch allows for json-c compile with -Werror and not fail due to
+ -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
+ Geoffrey Young, geoff at modperlcookbook dot org
0.7
* Add escaping of backslash to json output
#define _DEBUG_H_
extern void mc_set_debug(int debug);
-extern int mc_get_debug();
+extern int mc_get_debug(void);
extern void mc_set_syslog(int syslog);
extern void mc_abort(const char *msg, ...);
static struct lh_table *json_object_table;
-static void json_object_init() __attribute__ ((constructor));
-static void json_object_init() {
+static void json_object_init(void) __attribute__ ((constructor));
+static void json_object_init(void) {
MC_DEBUG("json_object_init: creating object table\n");
json_object_table = lh_kptr_table_new(128, "json_object_table", NULL);
}
-static void json_object_fini() __attribute__ ((destructor));
-static void json_object_fini() {
+static void json_object_fini(void) __attribute__ ((destructor));
+static void json_object_fini(void) {
struct lh_entry *ent;
if(MC_GET_DEBUG()) {
if (json_object_table->count) {
/** Create a new empty object
* @returns a json_object of type json_type_object
*/
-extern struct json_object* json_object_new_object();
+extern struct json_object* json_object_new_object(void);
/** Get the hashtable of a json_object of type json_type_object
* @param obj the json_object instance
/** Create a new empty json_object of type json_type_array
* @returns a json_object of type json_type_array
*/
-extern struct json_object* json_object_new_array();
+extern struct json_object* json_object_new_array(void);
/** Get the arraylist of a json_object of type json_type_array
* @param obj the json_object instance
extern const char* json_tokener_errors[];
-extern struct json_tokener* json_tokener_new();
+extern struct json_tokener* json_tokener_new(void);
extern void json_tokener_free(struct json_tokener *tok);
extern void json_tokener_reset(struct json_tokener *tok);
extern struct json_object* json_tokener_parse(char *str);
extern int lh_table_delete(struct lh_table *t, void *k);
+void lh_abort(const char *msg, ...);
+void lh_table_resize(struct lh_table *t, int new_size);
+
#endif
};
extern struct printbuf*
-printbuf_new();
+printbuf_new(void);
extern int
printbuf_memappend(struct printbuf *p, char *buf, int size);