odict: declare enum outside struct

This commit is contained in:
Richard Aas 2015-09-30 21:30:10 +00:00
parent 4ad85318c2
commit b026ae2920

View file

@ -4,6 +4,16 @@
* Copyright (C) 2010 - 2015 Creytiv.com
*/
enum odict_type {
ODICT_OBJECT,
ODICT_ARRAY,
ODICT_STRING,
ODICT_INT,
ODICT_DOUBLE,
ODICT_BOOL,
ODICT_NULL,
};
struct odict {
struct list lst;
struct hash *ht;
@ -19,15 +29,7 @@ struct odict_entry {
double dbl; /* ODICT_DOUBLE */
bool boolean; /* ODICT_BOOL */
} u;
enum odict_type {
ODICT_OBJECT,
ODICT_ARRAY,
ODICT_STRING,
ODICT_INT,
ODICT_DOUBLE,
ODICT_BOOL,
ODICT_NULL,
} type;
enum odict_type type;
};
int odict_alloc(struct odict **op, uint32_t hash_size);