an object_key_t instance. */
#define string_to_key(string) container_of(string, object_key_t, key)
-static size_t hash_key(const void *ptr)
+size_t jsonp_hash_key(const void *ptr)
{
const char *str = ((const object_key_t *)ptr)->key;
return hash;
}
-static int key_equal(const void *ptr1, const void *ptr2)
+int jsonp_key_equal(const void *ptr1, const void *ptr2)
{
return strcmp(((const object_key_t *)ptr1)->key,
((const object_key_t *)ptr2)->key) == 0;
return NULL;
json_init(&object->json, JSON_OBJECT);
- if(hashtable_init(&object->hashtable, hash_key, key_equal,
+ if(hashtable_init(&object->hashtable,
+ jsonp_hash_key, jsonp_key_equal,
free, value_decref))
{
free(object);