summaryrefslogtreecommitdiff
path: root/json_object.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2015-09-23 12:40:57 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2015-09-23 12:40:57 +0200
commit1ae4b50bdedfde89f179c7538ecf886d175a59b0 (patch)
tree9a841938883c2a095bd0f19adec67cd466faa69a /json_object.c
parent8f8d03df46cf412f69195e2e897956b9117168fe (diff)
downloadjson-c-1ae4b50bdedfde89f179c7538ecf886d175a59b0.tar.gz
remove unneeded data items from hashtable code
These items were used for statistics tracking, but no code at all exists to consume them. By removing them we save a) space because they counters required space, and did so in each and every json object b) performance because calloc() needs to write less data and the counters are no longer maintained; cache performance can be better, load on OS main memory is lighter We could conditionally enable/disable these counters, but I have not done this they were really nowhere used and it looked more like a left-over from the import of hashtable code.
Diffstat (limited to 'json_object.c')
-rw-r--r--json_object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/json_object.c b/json_object.c
index 55f7469..f950257 100644
--- a/json_object.c
+++ b/json_object.c
@@ -69,7 +69,7 @@ static struct lh_table *json_object_table;
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);
+ json_object_table = lh_kptr_table_new(128, NULL);
}
static void json_object_fini(void) __attribute__ ((destructor));
@@ -374,7 +374,7 @@ struct json_object* json_object_new_object(void)
jso->_delete = &json_object_object_delete;
jso->_to_json_string = &json_object_object_to_json_string;
jso->o.c_object = lh_kchar_table_new(JSON_OBJECT_DEF_HASH_ENTRIES,
- NULL, &json_object_lh_entry_free);
+ &json_object_lh_entry_free);
if (!jso->o.c_object)
{
json_object_generic_delete(jso);