summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2014-11-22 17:16:10 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2014-11-22 17:16:10 +0100
commitc100b483db2a35d004288f128c0c27d9976fc9c9 (patch)
tree071b9e787ba83bd19f53e203522f69426f703a13 /src
parenta3e1e9918745d2a1cf921d7b13b94ffcc45d50fe (diff)
Make render_html return a char*
Diffstat (limited to 'src')
-rw-r--r--src/cmark.c4
-rw-r--r--src/cmark.h4
-rw-r--r--src/html/html.c6
-rw-r--r--src/main.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/src/cmark.c b/src/cmark.c
index b20b84b..07b7c4c 100644
--- a/src/cmark.c
+++ b/src/cmark.c
@@ -7,10 +7,10 @@
#include "cmark.h"
#include "buffer.h"
-unsigned char *cmark_markdown_to_html(unsigned char *text, int len)
+char *cmark_markdown_to_html(unsigned char *text, int len)
{
cmark_node *blocks;
- unsigned char *result;
+ char *result;
blocks = cmark_parse_document(text, len);
diff --git a/src/cmark.h b/src/cmark.h
index a74fe93..206b667 100644
--- a/src/cmark.h
+++ b/src/cmark.h
@@ -190,10 +190,10 @@ CMARK_EXPORT
void cmark_debug_print(cmark_node *root);
CMARK_EXPORT
-unsigned char *cmark_render_html(cmark_node *root);
+char *cmark_render_html(cmark_node *root);
CMARK_EXPORT
-unsigned char *cmark_markdown_to_html(unsigned char *text, int len);
+char *cmark_markdown_to_html(unsigned char *text, int len);
#ifndef CMARK_NO_SHORT_NAMES
#define NODE_DOCUMENT CMARK_NODE_DOCUMENT
diff --git a/src/html/html.c b/src/html/html.c
index 96fce66..4fa79b1 100644
--- a/src/html/html.c
+++ b/src/html/html.c
@@ -348,12 +348,12 @@ finish_node(strbuf *html, cmark_node *node, bool tight)
return tight;
}
-unsigned char *cmark_render_html(cmark_node *root)
+char *cmark_render_html(cmark_node *root)
{
- unsigned char *result;
+ char *result;
strbuf html = GH_BUF_INIT;
node_to_html(&html, root);
- result = strbuf_detach(&html);
+ result = (char *)strbuf_detach(&html);
strbuf_free(&html);
return result;
}
diff --git a/src/main.c b/src/main.c
index 1cfddda..61d98dc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -17,7 +17,7 @@ void print_usage()
static void print_document(cmark_node *document, bool ast)
{
- unsigned char *result;
+ char *result;
if (ast) {
cmark_debug_print(document);
} else {