mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +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:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Calvin Rose
					Calvin Rose