]> git.sur5r.net Git - i3/i3/blobdiff - include/yajl_utils.h
Merge branch 'master' into next
[i3/i3] / include / yajl_utils.h
index cf963073fcbdb3dd40dc0277f941e8c00d4878a3..e8422aabd2d051294d3fedcd007b94658d0722b5 100644 (file)
 #include <yajl/yajl_version.h>
 
 /* Shorter names for all those yajl_gen_* functions */
-#define y(x, ...) yajl_gen_ ## x (gen, ##__VA_ARGS__)
-#define ystr(str) yajl_gen_string(gen, (unsigned char*)str, strlen(str))
+#define y(x, ...) yajl_gen_##x(gen, ##__VA_ARGS__)
+#define ystr(str) yajl_gen_string(gen, (unsigned char *)str, strlen(str))
 
-#if YAJL_MAJOR >= 2
 #define ygenalloc() yajl_gen_alloc(NULL)
 #define yalloc(callbacks, client) yajl_alloc(callbacks, NULL, client)
 typedef size_t ylength;
-#else
-#define ygenalloc() yajl_gen_alloc(NULL, NULL);
-#define yalloc(callbacks, client) yajl_alloc(callbacks, NULL, NULL, client)
-typedef unsigned int ylength;
-#endif