json_c_version.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2012,2017 Eric Haszlakiewicz
  3. *
  4. * This library is free software; you can redistribute it and/or modify
  5. * it under the terms of the MIT license. See COPYING for details.
  6. */
  7. /**
  8. * @file
  9. * @brief Methods for retrieving the json-c version.
  10. */
  11. #ifndef _json_c_version_h_
  12. #define _json_c_version_h_
  13. #define JSON_C_MAJOR_VERSION 0
  14. #define JSON_C_MINOR_VERSION 13
  15. #define JSON_C_MICRO_VERSION 01
  16. #define JSON_C_VERSION_NUM ((JSON_C_MAJOR_VERSION << 16) | \
  17. (JSON_C_MINOR_VERSION << 8) | \
  18. JSON_C_MICRO_VERSION)
  19. #define JSON_C_VERSION "0.13.1"
  20. /**
  21. * @see JSON_C_VERSION
  22. * @return the version of the json-c library as a string
  23. */
  24. const char *json_c_version(void); /* Returns JSON_C_VERSION */
  25. /**
  26. * The json-c version encoded into an int, with the low order 8 bits
  27. * being the micro version, the next higher 8 bits being the minor version
  28. * and the next higher 8 bits being the major version.
  29. * For example, 7.12.99 would be 0x00070B63.
  30. *
  31. * @see JSON_C_VERSION_NUM
  32. * @return the version of the json-c library as an int
  33. */
  34. int json_c_version_num(void); /* Returns JSON_C_VERSION_NUM */
  35. #endif