Scripting: MSVC build fixes

This commit is contained in:
Vicki Pfau 2022-09-21 22:57:12 -07:00
parent d4b3bcde0f
commit 7520d8fc06
2 changed files with 14 additions and 3 deletions

View File

@ -57,6 +57,17 @@
#define _mODD_8(A, B, ...) B, _mIDENT(_mODD_7(__VA_ARGS__)) #define _mODD_8(A, B, ...) B, _mIDENT(_mODD_7(__VA_ARGS__))
#define _mODD_9(A, B, ...) B, _mIDENT(_mODD_7(__VA_ARGS__)) #define _mODD_9(A, B, ...) B, _mIDENT(_mODD_7(__VA_ARGS__))
#define _mIF0_0(...) __VA_ARGS__
#define _mIF0_1(...)
#define _mIF0_2(...)
#define _mIF0_3(...)
#define _mIF0_4(...)
#define _mIF0_5(...)
#define _mIF0_6(...)
#define _mIF0_7(...)
#define _mIF0_8(...)
#define _mIF0_9(...)
#define _mSUCC_0 1 #define _mSUCC_0 1
#define _mSUCC_1 2 #define _mSUCC_1 2
#define _mSUCC_2 3 #define _mSUCC_2 3

View File

@ -393,8 +393,8 @@ CXX_GUARD_START
.function = { \ .function = { \
.parameters = { \ .parameters = { \
.count = NPARAMS, \ .count = NPARAMS, \
.entries = { _mCALL(mSCRIPT_PREFIX_ ## NPARAMS, mSCRIPT_TYPE_MS_, _mEVEN_ ## NPARAMS(__VA_ARGS__)) }, \ .entries = { _mCALL(_mIF0_ ## NPARAMS, 0) _mCALL(mSCRIPT_PREFIX_ ## NPARAMS, mSCRIPT_TYPE_MS_, _mEVEN_ ## NPARAMS(__VA_ARGS__)) }, \
.names = { _mCALL(_mCALL_ ## NPARAMS, _mSTRINGIFY, _mODD_ ## NPARAMS(__VA_ARGS__)) }, \ .names = { _mCALL(_mIF0_ ## NPARAMS, 0) _mCALL(_mCALL_ ## NPARAMS, _mSTRINGIFY, _mODD_ ## NPARAMS(__VA_ARGS__)) }, \
}, \ }, \
.returnType = { \ .returnType = { \
.count = NRET, \ .count = NRET, \
@ -433,7 +433,7 @@ CXX_GUARD_START
_mSCRIPT_CALL_VOID(FUNCTION, NPARAMS); \ _mSCRIPT_CALL_VOID(FUNCTION, NPARAMS); \
return true; \ return true; \
} \ } \
_mSCRIPT_BIND_FUNCTION(NAME, 0, , NPARAMS, __VA_ARGS__) _mSCRIPT_BIND_FUNCTION(NAME, 0, 0, NPARAMS, __VA_ARGS__)
#define mSCRIPT_MAKE(TYPE, VALUE) (struct mScriptValue) { \ #define mSCRIPT_MAKE(TYPE, VALUE) (struct mScriptValue) { \
.type = (mSCRIPT_TYPE_MS_ ## TYPE), \ .type = (mSCRIPT_TYPE_MS_ ## TYPE), \