summaryrefslogtreecommitdiff
path: root/utf8proc.h
diff options
context:
space:
mode:
authorSteven G. Johnson <stevenj@mit.edu>2015-03-27 12:35:41 -0400
committerSteven G. Johnson <stevenj@mit.edu>2015-03-27 12:35:41 -0400
commitc851c678881fe3d910b29d20f1c813ecd3b9d920 (patch)
treeb95ce4e39dcb9019cf327a5f28efc233903b8286 /utf8proc.h
parent164cc48aaf325cb4ffe227712e6488e1cb359d1c (diff)
downloadlibutf8proc-c851c678881fe3d910b29d20f1c813ecd3b9d920.tar.gz
libutf8proc-c851c678881fe3d910b29d20f1c813ecd3b9d920.tar.bz2
put the API version as #defines in the header file (as discussed in #30)
Diffstat (limited to 'utf8proc.h')
-rw-r--r--utf8proc.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/utf8proc.h b/utf8proc.h
index dc97b85..d1085fc 100644
--- a/utf8proc.h
+++ b/utf8proc.h
@@ -56,6 +56,27 @@
#ifndef UTF8PROC_H
#define UTF8PROC_H
+/** @name API version
+ *
+ * The utf8proc API version MAJOR.MINOR.PATCH, following
+ * semantic-versioning rules (http://semver.org) based on API
+ * compatibility.
+ *
+ * This is also returned at runtime by @ref utf8proc_version; however, the
+ * runtime version may append a string like "-dev" to the version number
+ * for prerelease versions.
+ *
+ * @note The shared-library version number in the Makefile will be different,
+ * being based on ABI compatibility rather than API compatibility.
+ */
+/** @{ */
+/** The MAJOR version number (increased when backwards API compatibility is broken). */
+#define UTF8PROC_VERSION_MAJOR 1
+/** The MINOR version number (increased when new functionality is added in a backwards-compatible manner). */
+#define UTF8PROC_VERSION_MINOR 2
+/** The PATCH version (increased for fixes that do not change the API). */
+#define UTF8PROC_VERSION_PATCH 0
+/** @} */
#include <stdlib.h>
#include <sys/types.h>
@@ -337,7 +358,9 @@ typedef enum {
DLLEXPORT extern const int8_t utf8proc_utf8class[256];
/**
- * Returns the version as a string.
+ * Returns the utf8proc API version as a string MAJOR.MINOR.PATCH
+ * (http://semver.org format), possibly with a "-dev" suffix for
+ * development versions.
*/
DLLEXPORT const char *utf8proc_version(void);