1
0
mirror of https://github.com/janet-lang/janet synced 2025-02-04 11:19:10 +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" { extern "C" {
#endif #endif
/* Variable length arrays are ok */
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable : 4200 )
#endif
/***** START SECTION CONFIG *****/ /***** START SECTION CONFIG *****/
#include "janetconf.h" #include "janetconf.h"
@ -1652,6 +1658,11 @@ JANET_API int janet_thread_send(JanetThread *thread, Janet msg, double timeout);
/***** END SECTION MAIN *****/ /***** END SECTION MAIN *****/
/* Re-enable popped variable length array warnings */
#ifdef _MSC_VER
#pragma warning( pop )
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif