summaryrefslogtreecommitdiff
path: root/src/cmark.c
diff options
context:
space:
mode:
authorAndrius Bentkus <andrius.bentkus@gmail.com>2015-06-25 11:14:00 +0200
committerAndrius Bentkus <andrius.bentkus@gmail.com>2015-06-25 17:31:34 +0200
commit06b355f5a97bd5fb19cfad7e8065d5e8a6c37bce (patch)
tree3b658b774f028c7a0b9962411a4a6a3e21850b42 /src/cmark.c
parent2f945071616d226296068e3c61b6de2e64c813cf (diff)
Changed version variables to functions.
This is easier to access using ffi, since some languages, like C# like to use only function interfaces for accessing library functionality. fixes #60
Diffstat (limited to 'src/cmark.c')
-rw-r--r--src/cmark.c11
1 files changed, 9 insertions, 2 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)
{