2012-11-03 07:17:28 -04:00
|
|
|
/*
|
|
|
|
* vim:ts=4:sw=4:expandtab
|
|
|
|
*
|
|
|
|
* i3 - an improved dynamic tiling window manager
|
|
|
|
* © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
|
|
|
|
*
|
|
|
|
* yajl_utils.h
|
|
|
|
*
|
|
|
|
*/
|
2013-12-28 21:11:50 -05:00
|
|
|
#pragma once
|
2012-11-03 07:17:28 -04:00
|
|
|
|
|
|
|
#include <yajl/yajl_gen.h>
|
|
|
|
#include <yajl/yajl_parse.h>
|
|
|
|
#include <yajl/yajl_version.h>
|
|
|
|
|
|
|
|
/* Shorter names for all those yajl_gen_* functions */
|
2014-06-19 05:20:32 -04:00
|
|
|
#define y(x, ...) yajl_gen_##x(gen, ##__VA_ARGS__)
|
|
|
|
#define ystr(str) yajl_gen_string(gen, (unsigned char *)str, strlen(str))
|
2012-11-03 07:17:28 -04:00
|
|
|
|
|
|
|
#define ygenalloc() yajl_gen_alloc(NULL)
|
|
|
|
#define yalloc(callbacks, client) yajl_alloc(callbacks, NULL, client)
|
|
|
|
typedef size_t ylength;
|