cJSON_Version: returns a version string

This is useful to programmatically find out the version of cJSON that
has been used (useful in case of scripting language bindings for
example).
This commit is contained in:
Max Bruckner
2017-01-12 20:37:29 +01:00
parent e7533aa6f0
commit c49ffbfba8
3 changed files with 15 additions and 0 deletions

View File

@@ -32,6 +32,10 @@ extern "C"
#define CJSON_VERSION_MAJOR 1
#define CJSON_VERSION_MINOR 2
#define CJSON_VERSION_PATCH 0
/* returns the version of cJSON as a string */
extern const char* cJSON_Version(void);
#include <stddef.h>
/* cJSON Types: */