summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-06-26 12:23:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-06-26 12:23:42 -0700
commitbae7b61487f58f296389d5007df7166ddcfecad8 (patch)
tree3b658b774f028c7a0b9962411a4a6a3e21850b42 /src
parent2f945071616d226296068e3c61b6de2e64c813cf (diff)
parent06b355f5a97bd5fb19cfad7e8065d5e8a6c37bce (diff)
Merge pull request #61 from txdv/version-functions-ffi
Changed version variables to functions.
Diffstat (limited to 'src')
-rw-r--r--src/cmark.c11
-rw-r--r--src/cmark.h4
2 files changed, 11 insertions, 4 deletions
diff --git a/src/cmark.c b/src/cmark.c
index 35765b1..ca9807b 100644
--- a/src/cmark.c
+++ b/src/cmark.c
@@ -6,8 +6,15 @@
#include "cmark.h"
#include "buffer.h"
-const int cmark_version = CMARK_VERSION;
-const char cmark_version_string[] = CMARK_VERSION_STRING;
+int cmark_version()
+{
+ return CMARK_VERSION;
+}
+
+const char *cmark_version_string()
+{
+ return CMARK_VERSION_STRING;
+}
char *cmark_markdown_to_html(const char *text, size_t len, int options)
{
diff --git a/src/cmark.h b/src/cmark.h
index 4ff1ca0..192290c 100644
--- a/src/cmark.h
+++ b/src/cmark.h
@@ -525,13 +525,13 @@ char *cmark_render_commonmark(cmark_node *root, int options, int width);
* In hexadecimal format, the number 0x010203 represents version 1.2.3.
*/
CMARK_EXPORT
-extern const int cmark_version;
+int cmark_version();
/** The library version string for runtime checks. Also available as
* macro CMARK_VERSION_STRING for compile time checks.
*/
CMARK_EXPORT
-extern const char cmark_version_string[];
+const char *cmark_version_string();
/** # AUTHORS
*