diff options
| author | Kevin Wojniak <kainjow@kainjow.com> | 2015-08-10 09:45:59 -0700 | 
|---|---|---|
| committer | Kevin Wojniak <kainjow@kainjow.com> | 2015-08-10 09:46:49 -0700 | 
| commit | 7baf9297f4f2e368c7c91ac76e16e88902987ec6 (patch) | |
| tree | caed64a23fd6b35d8e8d1070575e751b6f033b90 /src/buffer.h | |
| parent | a541e39f69cfa75422fbe70c59c2ac40fbdbe1d7 (diff) | |
Fix MSVC inline errors when cmark is included in other sources that don't have the same set of disabled warnings
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 e99db72..88b79f3 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); -static inline const char *cmark_strbuf_cstr(const cmark_strbuf *buf) { +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); -static inline bufsize_t cmark_strbuf_check_bufsize(size_t size) { +CMARK_INLINE bufsize_t cmark_strbuf_check_bufsize(size_t size) {    if (size > BUFSIZE_MAX) {      cmark_strbuf_overflow_err();    }    return (bufsize_t)size;  } -static inline bufsize_t cmark_strbuf_safe_strlen(const char *str) { +CMARK_INLINE bufsize_t cmark_strbuf_safe_strlen(const char *str) {    return cmark_strbuf_check_bufsize(strlen(str));  }  | 
