From ca5ca36d9bb738c28ff54feb01dd99de2244f2fd Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel Date: Mon, 17 Mar 2014 07:43:08 +0200 Subject: typos and formatting --- src/api/yajl_tree.h | 6 +++--- src/yajl_tree.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/yajl_tree.h b/src/api/yajl_tree.h index 729c579..5d06879 100644 --- a/src/api/yajl_tree.h +++ b/src/api/yajl_tree.h @@ -67,7 +67,7 @@ typedef struct yajl_val_s * yajl_val; */ struct yajl_val_s { - /** Type of the value contained. Use the "YAJL_IS_*" macors to check for a + /** Type of the value contained. Use the "YAJL_IS_*" macros to check for a * specific type. */ yajl_type type; /** Type-specific data. You may use the "YAJL_GET_*" macros to access these @@ -78,10 +78,10 @@ struct yajl_val_s struct { long long i; /*< integer value, if representable. */ double d; /*< double value, if representable. */ + char *r; /*< unparsed number in string form. */ /** Signals whether the \em i and \em d members are * valid. See \c YAJL_NUMBER_INT_VALID and * \c YAJL_NUMBER_DOUBLE_VALID. */ - char *r; /*< unparsed number in string form. */ unsigned int flags; } number; struct { @@ -137,7 +137,7 @@ YAJL_API void yajl_tree_free (yajl_val v); * \param type the yajl_type of the object you seek, or yajl_t_any if any will do. * * \returns a pointer to the found value, or NULL if we came up empty. - * + * * Future Ideas: it'd be nice to move path to a string and implement support for * a teeny tiny micro language here, so you can extract array elements, do things * like .first and .last, even .length. Inspiration from JSONPath and css selectors? diff --git a/src/yajl_tree.c b/src/yajl_tree.c index f486e89..3d357a3 100644 --- a/src/yajl_tree.c +++ b/src/yajl_tree.c @@ -194,7 +194,7 @@ static int array_add_value (context_t *ctx, /* "context_add_value" will only call us with array values. */ assert(YAJL_IS_ARRAY(array)); - + tmp = realloc(array->u.array.values, sizeof(*(array->u.array.values)) * (array->u.array.len + 1)); if (tmp == NULL) -- cgit v1.2.1