aboutsummaryrefslogtreecommitdiff
path: root/strbuf.h
diff options
context:
space:
mode:
authorspacewander <spacewanderlzx@gmail.com>2017-01-31 13:09:55 +0800
committerYichun Zhang (agentzh) <agentzh@gmail.com>2017-01-31 12:17:37 -0800
commitfd35fd98035735bc91c55d14832461e41dd0e193 (patch)
tree364d8e04b07fdb7390e76629afd2e7ccaff2cacd /strbuf.h
parenta61d7840ba2d79df8cb73d8c864a99d0eb06d580 (diff)
downloadlua-cjson-fd35fd98035735bc91c55d14832461e41dd0e193.tar.gz
lua-cjson-fd35fd98035735bc91c55d14832461e41dd0e193.tar.bz2
lua-cjson-fd35fd98035735bc91c55d14832461e41dd0e193.zip
feature: supports MS C compiler older than VC2012.
Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
Diffstat (limited to 'strbuf.h')
-rw-r--r--strbuf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/strbuf.h b/strbuf.h
index d861108..5df0b7b 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -25,6 +25,11 @@
25#include <stdlib.h> 25#include <stdlib.h>
26#include <stdarg.h> 26#include <stdarg.h>
27 27
28/* Workaround for MSVC */
29#ifdef _MSC_VER
30#define inline __inline
31#endif
32
28/* Size: Total bytes allocated to *buf 33/* Size: Total bytes allocated to *buf
29 * Length: String length, excluding optional NULL terminator. 34 * Length: String length, excluding optional NULL terminator.
30 * Increment: Allocation increments when resizing the string buffer. 35 * Increment: Allocation increments when resizing the string buffer.