diff options
| -rw-r--r-- | include/plist/plist.h | 7 | ||||
| -rw-r--r-- | src/plist.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index 0a9f5ee..426e34f 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h | |||
| @@ -1215,6 +1215,13 @@ extern "C" | |||
| 1215 | */ | 1215 | */ |
| 1216 | PLIST_API void plist_set_debug(int debug); | 1216 | PLIST_API void plist_set_debug(int debug); |
| 1217 | 1217 | ||
| 1218 | /** | ||
| 1219 | * Returns a static string of the libplist version. | ||
| 1220 | * | ||
| 1221 | * @return The libplist version as static ascii string | ||
| 1222 | */ | ||
| 1223 | PLIST_API const char* libplist_version(); | ||
| 1224 | |||
| 1218 | /*@}*/ | 1225 | /*@}*/ |
| 1219 | 1226 | ||
| 1220 | #ifdef __cplusplus | 1227 | #ifdef __cplusplus |
diff --git a/src/plist.c b/src/plist.c index e8f6974..2078520 100644 --- a/src/plist.c +++ b/src/plist.c | |||
| @@ -1739,3 +1739,11 @@ void plist_print(plist_t plist) | |||
| 1739 | { | 1739 | { |
| 1740 | plist_write_to_stream(plist, stdout, PLIST_FORMAT_PRINT, PLIST_OPT_PARTIAL_DATA); | 1740 | plist_write_to_stream(plist, stdout, PLIST_FORMAT_PRINT, PLIST_OPT_PARTIAL_DATA); |
| 1741 | } | 1741 | } |
| 1742 | |||
| 1743 | const char* libplist_version() | ||
| 1744 | { | ||
| 1745 | #ifndef PACKAGE_VERSION | ||
| 1746 | #error PACKAGE_VERSION is not defined! | ||
| 1747 | #endif | ||
| 1748 | return PACKAGE_VERSION; | ||
| 1749 | } | ||
