summaryrefslogtreecommitdiff
path: root/src/blocks.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2016-03-12 11:13:14 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2016-03-12 11:13:14 +0100
commit0e216b4044f1cbbf30df4e378d51d91a0267e680 (patch)
treef92e1216c64d92cdc3c517756de70971e3dbd752 /src/blocks.c
parent8bff268ba84c67a1ac2761679457532439da482b (diff)
Switch from "inline" to "CMARK_INLINE"
Newer MSVC versions support enough of C99 to be able to compile cmark in plain C mode. Only the "inline" keyword is still unsupported. We have to use "__inline" instead.
Diffstat (limited to 'src/blocks.c')
-rw-r--r--src/blocks.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/blocks.c b/src/blocks.c
index 925585d..00639cf 100644
--- a/src/blocks.c
+++ b/src/blocks.c
@@ -30,11 +30,11 @@
#define peek_at(i, n) (i)->data[n]
-static inline bool S_is_line_end_char(char c) {
+static CMARK_INLINE bool S_is_line_end_char(char c) {
return (c == '\n' || c == '\r');
}
-static inline bool S_is_space_or_tab(char c) {
+static CMARK_INLINE bool S_is_space_or_tab(char c) {
return (c == ' ' || c == '\t');
}
@@ -126,7 +126,7 @@ static bool is_blank(cmark_strbuf *s, bufsize_t offset) {
return true;
}
-static inline bool can_contain(cmark_node_type parent_type,
+static CMARK_INLINE bool can_contain(cmark_node_type parent_type,
cmark_node_type child_type) {
return (parent_type == CMARK_NODE_DOCUMENT ||
parent_type == CMARK_NODE_BLOCK_QUOTE ||
@@ -134,13 +134,13 @@ static inline bool can_contain(cmark_node_type parent_type,
(parent_type == CMARK_NODE_LIST && child_type == CMARK_NODE_ITEM));
}
-static inline bool accepts_lines(cmark_node_type block_type) {
+static CMARK_INLINE bool accepts_lines(cmark_node_type block_type) {
return (block_type == CMARK_NODE_PARAGRAPH ||
block_type == CMARK_NODE_HEADING ||
block_type == CMARK_NODE_CODE_BLOCK);
}
-static inline bool contains_inlines(cmark_node_type block_type) {
+static CMARK_INLINE bool contains_inlines(cmark_node_type block_type) {
return (block_type == CMARK_NODE_PARAGRAPH ||
block_type == CMARK_NODE_HEADING);
}