Merge branch '2.6'

This commit is contained in:
Petri Lehtinen
2014-02-11 14:49:15 +02:00
23 changed files with 985 additions and 135 deletions

View File

@@ -9,11 +9,19 @@
#define _GNU_SOURCE
#endif
#ifdef HAVE_CONFIG_H
#include <jansson_private_config.h>
#endif
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#include "jansson.h"
#include "hashtable.h"
#include "jansson_private.h"
@@ -36,11 +44,19 @@ static JSON_INLINE void json_init(json_t *json, json_type type)
/*** object ***/
extern volatile uint32_t hashtable_seed;
json_t *json_object(void)
{
json_object_t *object = jsonp_malloc(sizeof(json_object_t));
if(!object)
return NULL;
if (!hashtable_seed) {
/* Autoseed */
json_object_seed(0);
}
json_init(&object->json, JSON_OBJECT);
if(hashtable_init(&object->hashtable))