1
0
mirror of https://github.com/janet-lang/janet synced 2024-06-18 11:19:56 +00:00

Silence warning in MSVC about VLAs.

When janet.h is included as a C++ header in
MSVC, shows warnings.
This commit is contained in:
Calvin Rose 2020-04-25 17:13:00 -04:00
parent 57332c5ccf
commit da4d8254fa

View File

@ -27,6 +27,12 @@
extern "C" {
#endif
/* Variable length arrays are ok */
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4200 )
#endif
/***** START SECTION CONFIG *****/
#include "janetconf.h"
@ -1652,6 +1658,11 @@ JANET_API int janet_thread_send(JanetThread *thread, Janet msg, double timeout);
/***** END SECTION MAIN *****/
/* Re-enable popped variable length array warnings */
#ifdef _MSC_VER
#pragma warning( pop )
#endif
#ifdef __cplusplus
}
#endif