[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140311133818.GF22678@krava.redhat.com>
Date: Tue, 11 Mar 2014 14:38:19 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: acme@...radead.org, mingo@...nel.org, linux-kernel@...r.kernel.org,
peterz@...radead.org, eranian@...gle.com, namhyung@...nel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 1/8] perf, tools: Add jsmn `jasmine' JSON parser
On Wed, Mar 05, 2014 at 11:49:31AM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>
SNIP
> +/* Return line number of a jsmn token */
> +int json_line(char *map, jsmntok_t *t)
> +{
> + return countchar(map, '\n', t->start) + 1;
> +}
> +
> +static const char *jsmn_types[] = {
> + [JSMN_PRIMITIVE] = "primitive",
> + [JSMN_ARRAY] = "array",
> + [JSMN_OBJECT] = "object",
> + [JSMN_STRING] = "string"
> +};
> +
> +#define NELE(x) (sizeof(x) / sizeof(*(x)))
use ARRAY_SIZE
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists