2012-11-03 12:17:28 +01:00
|
|
|
/*
|
|
|
|
* vim:ts=4:sw=4:expandtab
|
|
|
|
*
|
|
|
|
* i3 - an improved dynamic tiling window manager
|
2015-04-04 02:17:56 +02:00
|
|
|
* © 2009 Michael Stapelberg and contributors (see also: LICENSE)
|
2012-11-03 12:17:28 +01:00
|
|
|
*
|
|
|
|
* yajl_utils.h
|
|
|
|
*
|
|
|
|
*/
|
2013-12-29 03:11:50 +01:00
|
|
|
#pragma once
|
2012-11-03 12:17:28 +01:00
|
|
|
|
2016-10-11 09:13:35 +02:00
|
|
|
#include <config.h>
|
|
|
|
|
2012-11-03 12:17:28 +01: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 11:20:32 +02: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 12:17:28 +01:00
|
|
|
|
|
|
|
#define ygenalloc() yajl_gen_alloc(NULL)
|
|
|
|
#define yalloc(callbacks, client) yajl_alloc(callbacks, NULL, client)
|
|
|
|
typedef size_t ylength;
|