commit | fb2385900d6586a4e6f77cc901d7523320921926 | [log] [tgz] |
---|---|---|
author | Nick Gasson <nick.gasson@acano.com> | Mon Jan 06 11:01:41 2014 +0000 |
committer | antirez <antirez@gmail.com> | Wed Mar 12 16:26:15 2014 +0100 |
tree | 72470eee21866740a47f4685e15bde4dd51e0e0a | |
parent | 94cbdd6540a79b5a3fda81a0044cf47fe2c2f0d9 [diff] |
Add extern "C" around linenoise.h when compiled as C++
diff --git a/linenoise.h b/linenoise.h index b0a168e..9549c91 100644 --- a/linenoise.h +++ b/linenoise.h
@@ -37,6 +37,10 @@ #ifndef __LINENOISE_H #define __LINENOISE_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct linenoiseCompletions { size_t len; char **cvec; @@ -54,4 +58,8 @@ void linenoiseClearScreen(void); void linenoiseSetMultiLine(int ml); +#ifdef __cplusplus +} +#endif + #endif /* __LINENOISE_H */