From 675b92aa6b6c8124c8ccf9535e338fd37b8b9977 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sun, 16 Nov 2014 21:56:49 +0100 Subject: Move inline function definitions to header files Inline functions must be defined in header files in order to be inlined in other compilation units. This also fixes the MSVC build where out-of-line versions weren't created and allows to remove the -fgnu89-inline flag. --- src/buffer.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/buffer.h') diff --git a/src/buffer.h b/src/buffer.h index acbead7..be888e1 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -84,10 +84,13 @@ void cmark_strbuf_attach(cmark_strbuf *buf, unsigned char *ptr, int asize); CMARK_EXPORT unsigned char *cmark_strbuf_detach(cmark_strbuf *buf); CMARK_EXPORT -inline const char *cmark_strbuf_cstr(const cmark_strbuf *buf); -CMARK_EXPORT void cmark_strbuf_copy_cstr(char *data, int datasize, const cmark_strbuf *buf); +static inline const char *cmark_strbuf_cstr(const cmark_strbuf *buf) +{ + return (char *)buf->ptr; +} + #define cmark_strbuf_at(buf, n) ((buf)->ptr[n]) /* -- cgit v1.2.3