]> git.sur5r.net Git - i3/i3/blobdiff - include/yajl_utils.h
Merge branch 'master' into next
[i3/i3] / include / yajl_utils.h
index cf963073fcbdb3dd40dc0277f941e8c00d4878a3..93c63d8f7b641a14da94d61eb10841454721a97a 100644 (file)
@@ -2,7 +2,7 @@
  * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
- * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
  * yajl_utils.h
  *
 #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