Skip to content

Commit 7bff9af

Browse files
committed
json-wrier,refactor: add macros for defining the version of the file format
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 573fd7b commit 7bff9af

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main/writer-json.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#ifdef HAVE_JANSSON
2626
#include <jansson.h>
2727

28+
#define JSON_WRITER_MAJOR 0
29+
#define JSON_WRITER_MINOR 0
30+
2831
#ifndef json_boolean /* compat with jansson < 2.4 */
2932
#define json_boolean(val) ((val) ? json_true() : json_false())
3033
#endif
@@ -270,7 +273,7 @@ extern bool ptagMakeJsonOutputVersion (ptagDesc *desc, langType language CTAGS_A
270273
const void *data CTAGS_ATTR_UNUSED)
271274
{
272275
return writePseudoTag (desc,
273-
"0.0",
276+
STRINGIFY(JSON_WRITER_MAJOR) "." STRINGIFY(JSON_WRITER_MINOR),
274277
"in development",
275278
NULL);
276279
}

0 commit comments

Comments
 (0)