From 0e216b4044f1cbbf30df4e378d51d91a0267e680 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 12 Mar 2016 11:13:14 +0100 Subject: 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. --- src/blocks.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/blocks.c') 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); } -- cgit v1.2.3