Add a libplist_version() function to the interface

This commit is contained in:
Nikias Bassen
2024-02-05 11:47:06 +01:00
parent 3daee6097c
commit 082b69db5d
2 changed files with 15 additions and 0 deletions
+7
View File
@@ -1215,6 +1215,13 @@ extern "C"
*/
PLIST_API void plist_set_debug(int debug);
/**
* Returns a static string of the libplist version.
*
* @return The libplist version as static ascii string
*/
PLIST_API const char* libplist_version();
/*@}*/
#ifdef __cplusplus
+8
View File
@@ -1739,3 +1739,11 @@ void plist_print(plist_t plist)
{
plist_write_to_stream(plist, stdout, PLIST_FORMAT_PRINT, PLIST_OPT_PARTIAL_DATA);
}
const char* libplist_version()
{
#ifndef PACKAGE_VERSION
#error PACKAGE_VERSION is not defined!
#endif
return PACKAGE_VERSION;
}