diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-08-10 20:22:29 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-08-10 20:22:29 -0700 |
commit | f1b1e2ec71f50a00850db3a68c421a2d79bba115 (patch) | |
tree | fccd86d01fb7d6bb7a7fabdc0b451cd113a71b9d /src/buffer.h | |
parent | 735098e097ad62bdc4b1121c6c0c983eb7483485 (diff) |
Don't include static in CMARK_INLINE.
ALso don't set CMARK_INLINE to __inline if we're compiling
under MSVC in cplusplus mode.
Diffstat (limited to 'src/buffer.h')
-rw-r--r-- | src/buffer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer.h b/src/buffer.h index 88b79f3..6fd0cae 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -48,7 +48,7 @@ unsigned char *cmark_strbuf_detach(cmark_strbuf *buf); void cmark_strbuf_copy_cstr(char *data, bufsize_t datasize, const cmark_strbuf *buf); -CMARK_INLINE const char *cmark_strbuf_cstr(const cmark_strbuf *buf) { +static CMARK_INLINE const char *cmark_strbuf_cstr(const cmark_strbuf *buf) { return (char *)buf->ptr; } @@ -75,14 +75,14 @@ void cmark_strbuf_unescape(cmark_strbuf *s); /* Print error and abort. */ void cmark_strbuf_overflow_err(void); -CMARK_INLINE bufsize_t cmark_strbuf_check_bufsize(size_t size) { +static CMARK_INLINE bufsize_t cmark_strbuf_check_bufsize(size_t size) { if (size > BUFSIZE_MAX) { cmark_strbuf_overflow_err(); } return (bufsize_t)size; } -CMARK_INLINE bufsize_t cmark_strbuf_safe_strlen(const char *str) { +static CMARK_INLINE bufsize_t cmark_strbuf_safe_strlen(const char *str) { return cmark_strbuf_check_bufsize(strlen(str)); } |