mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Fix compile errors on Linux with new VScript param limit.
This commit is contained in:
@ -929,21 +929,6 @@ public:
|
|||||||
ScriptVariant_t args[12]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12;
|
ScriptVariant_t args[12]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12;
|
||||||
return ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, hScope, bWait );
|
return ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, hScope, bWait );
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ARG_TYPE_1, typename ARG_TYPE_2, typename ARG_TYPE_3, typename ARG_TYPE_4, typename ARG_TYPE_5, typename ARG_TYPE_6, typename ARG_TYPE_7, typename ARG_TYPE_8, typename ARG_TYPE_9, typename ARG_TYPE_10, typename ARG_TYPE_11, typename ARG_TYPE_12, typename ARG_TYPE_13>
|
|
||||||
ScriptStatus_t Call( HSCRIPT hFunction, HSCRIPT hScope, bool bWait, ScriptVariant_t *pReturn, ARG_TYPE_1 arg1, ARG_TYPE_2 arg2, ARG_TYPE_3 arg3, ARG_TYPE_4 arg4, ARG_TYPE_5 arg5, ARG_TYPE_6 arg6, ARG_TYPE_7 arg7, ARG_TYPE_8 arg8, ARG_TYPE_9 arg9, ARG_TYPE_10 arg10, ARG_TYPE_11 arg11, ARG_TYPE_12 arg12, ARG_TYPE_13 arg13 )
|
|
||||||
{
|
|
||||||
ScriptVariant_t args[13]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12; args[12] = arg13;
|
|
||||||
return ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, hScope, bWait );
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename ARG_TYPE_1, typename ARG_TYPE_2, typename ARG_TYPE_3, typename ARG_TYPE_4, typename ARG_TYPE_5, typename ARG_TYPE_6, typename ARG_TYPE_7, typename ARG_TYPE_8, typename ARG_TYPE_9, typename ARG_TYPE_10, typename ARG_TYPE_11, typename ARG_TYPE_12, typename ARG_TYPE_13, typename ARG_TYPE_14>
|
|
||||||
ScriptStatus_t Call( HSCRIPT hFunction, HSCRIPT hScope, bool bWait, ScriptVariant_t *pReturn, ARG_TYPE_1 arg1, ARG_TYPE_2 arg2, ARG_TYPE_3 arg3, ARG_TYPE_4 arg4, ARG_TYPE_5 arg5, ARG_TYPE_6 arg6, ARG_TYPE_7 arg7, ARG_TYPE_8 arg8, ARG_TYPE_9 arg9, ARG_TYPE_10 arg10, ARG_TYPE_11 arg11, ARG_TYPE_12 arg12, ARG_TYPE_13 arg13, ARG_TYPE_14 arg14 )
|
|
||||||
{
|
|
||||||
ScriptVariant_t args[14]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12; args[12] = arg13; args[13] = arg14;
|
|
||||||
return ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, hScope, bWait );
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1188,20 +1173,6 @@ public:
|
|||||||
return GetVM()->ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, m_hScope, true );
|
return GetVM()->ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, m_hScope, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ARG_TYPE_1, typename ARG_TYPE_2, typename ARG_TYPE_3, typename ARG_TYPE_4, typename ARG_TYPE_5, typename ARG_TYPE_6, typename ARG_TYPE_7, typename ARG_TYPE_8, typename ARG_TYPE_9, typename ARG_TYPE_10, typename ARG_TYPE_11, typename ARG_TYPE_12, typename ARG_TYPE_13>
|
|
||||||
ScriptStatus_t Call( HSCRIPT hFunction, ScriptVariant_t *pReturn, ARG_TYPE_1 arg1, ARG_TYPE_2 arg2, ARG_TYPE_3 arg3, ARG_TYPE_4 arg4, ARG_TYPE_5 arg5, ARG_TYPE_6 arg6, ARG_TYPE_7 arg7, ARG_TYPE_8 arg8, ARG_TYPE_9 arg9, ARG_TYPE_10 arg10, ARG_TYPE_11 arg11, ARG_TYPE_12 arg12, ARG_TYPE_13 arg13 )
|
|
||||||
{
|
|
||||||
ScriptVariant_t args[13]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12; args[12] = arg13;
|
|
||||||
return GetVM()->ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, m_hScope, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename ARG_TYPE_1, typename ARG_TYPE_2, typename ARG_TYPE_3, typename ARG_TYPE_4, typename ARG_TYPE_5, typename ARG_TYPE_6, typename ARG_TYPE_7, typename ARG_TYPE_8, typename ARG_TYPE_9, typename ARG_TYPE_10, typename ARG_TYPE_11, typename ARG_TYPE_12, typename ARG_TYPE_13, typename ARG_TYPE_14>
|
|
||||||
ScriptStatus_t Call( HSCRIPT hFunction, ScriptVariant_t *pReturn, ARG_TYPE_1 arg1, ARG_TYPE_2 arg2, ARG_TYPE_3 arg3, ARG_TYPE_4 arg4, ARG_TYPE_5 arg5, ARG_TYPE_6 arg6, ARG_TYPE_7 arg7, ARG_TYPE_8 arg8, ARG_TYPE_9 arg9, ARG_TYPE_10 arg10, ARG_TYPE_11 arg11, ARG_TYPE_12 arg12, ARG_TYPE_13 arg13, ARG_TYPE_14 arg14 )
|
|
||||||
{
|
|
||||||
ScriptVariant_t args[14]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12; args[12] = arg13; args[13] = arg14;
|
|
||||||
return GetVM()->ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, m_hScope, true );
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptStatus_t Call( const char *pszFunction, ScriptVariant_t *pReturn = NULL )
|
ScriptStatus_t Call( const char *pszFunction, ScriptVariant_t *pReturn = NULL )
|
||||||
{
|
{
|
||||||
HSCRIPT hFunction = GetVM()->LookupFunction( pszFunction, m_hScope );
|
HSCRIPT hFunction = GetVM()->LookupFunction( pszFunction, m_hScope );
|
||||||
@ -1356,30 +1327,6 @@ public:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename ARG_TYPE_1, typename ARG_TYPE_2, typename ARG_TYPE_3, typename ARG_TYPE_4, typename ARG_TYPE_5, typename ARG_TYPE_6, typename ARG_TYPE_7, typename ARG_TYPE_8, typename ARG_TYPE_9, typename ARG_TYPE_10, typename ARG_TYPE_11, typename ARG_TYPE_12, typename ARG_TYPE_13>
|
|
||||||
ScriptStatus_t Call( const char *pszFunction, ScriptVariant_t *pReturn, ARG_TYPE_1 arg1, ARG_TYPE_2 arg2, ARG_TYPE_3 arg3, ARG_TYPE_4 arg4, ARG_TYPE_5 arg5, ARG_TYPE_6 arg6, ARG_TYPE_7 arg7, ARG_TYPE_8 arg8, ARG_TYPE_9 arg9, ARG_TYPE_10 arg10, ARG_TYPE_11 arg11, ARG_TYPE_12 arg12, ARG_TYPE_13 arg13 )
|
|
||||||
{
|
|
||||||
ScriptVariant_t args[13]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12; args[12] = arg13;
|
|
||||||
HSCRIPT hFunction = GetVM()->LookupFunction( pszFunction, m_hScope );
|
|
||||||
if ( !hFunction )
|
|
||||||
return SCRIPT_ERROR;
|
|
||||||
ScriptStatus_t status = GetVM()->ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, m_hScope, true );
|
|
||||||
GetVM()->ReleaseFunction( hFunction );
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename ARG_TYPE_1, typename ARG_TYPE_2, typename ARG_TYPE_3, typename ARG_TYPE_4, typename ARG_TYPE_5, typename ARG_TYPE_6, typename ARG_TYPE_7, typename ARG_TYPE_8, typename ARG_TYPE_9, typename ARG_TYPE_10, typename ARG_TYPE_11, typename ARG_TYPE_12, typename ARG_TYPE_13, typename ARG_TYPE_14>
|
|
||||||
ScriptStatus_t Call( const char *pszFunction, ScriptVariant_t *pReturn, ARG_TYPE_1 arg1, ARG_TYPE_2 arg2, ARG_TYPE_3 arg3, ARG_TYPE_4 arg4, ARG_TYPE_5 arg5, ARG_TYPE_6 arg6, ARG_TYPE_7 arg7, ARG_TYPE_8 arg8, ARG_TYPE_9 arg9, ARG_TYPE_10 arg10, ARG_TYPE_11 arg11, ARG_TYPE_12 arg12, ARG_TYPE_13 arg13, ARG_TYPE_14 arg14 )
|
|
||||||
{
|
|
||||||
ScriptVariant_t args[14]; args[0] = arg1; args[1] = arg2; args[2] = arg3; args[3] = arg4; args[4] = arg5; args[5] = arg6; args[6] = arg7; args[7] = arg8; args[8] = arg9; args[9] = arg10; args[10] = arg11; args[11] = arg12; args[12] = arg13; args[13] = arg14;
|
|
||||||
HSCRIPT hFunction = GetVM()->LookupFunction( pszFunction, m_hScope );
|
|
||||||
if ( !hFunction )
|
|
||||||
return SCRIPT_ERROR;
|
|
||||||
ScriptStatus_t status = GetVM()->ExecuteFunction( hFunction, args, ARRAYSIZE(args), pReturn, m_hScope, true );
|
|
||||||
GetVM()->ReleaseFunction( hFunction );
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
HSCRIPT m_hScope;
|
HSCRIPT m_hScope;
|
||||||
int m_flags;
|
int m_flags;
|
||||||
@ -1487,8 +1434,6 @@ public:
|
|||||||
#define DEFINE_SCRIPT_PROXY_10( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 10 )
|
#define DEFINE_SCRIPT_PROXY_10( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 10 )
|
||||||
#define DEFINE_SCRIPT_PROXY_11( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 11 )
|
#define DEFINE_SCRIPT_PROXY_11( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 11 )
|
||||||
#define DEFINE_SCRIPT_PROXY_12( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 12 )
|
#define DEFINE_SCRIPT_PROXY_12( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 12 )
|
||||||
#define DEFINE_SCRIPT_PROXY_13( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 13 )
|
|
||||||
#define DEFINE_SCRIPT_PROXY_14( FuncName ) DEFINE_SCRIPT_PROXY_GUTS( FuncName, 14 )
|
|
||||||
|
|
||||||
#define DEFINE_SCRIPT_PROXY_1V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 1 )
|
#define DEFINE_SCRIPT_PROXY_1V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 1 )
|
||||||
#define DEFINE_SCRIPT_PROXY_2V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 2 )
|
#define DEFINE_SCRIPT_PROXY_2V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 2 )
|
||||||
@ -1502,8 +1447,6 @@ public:
|
|||||||
#define DEFINE_SCRIPT_PROXY_10V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 10 )
|
#define DEFINE_SCRIPT_PROXY_10V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 10 )
|
||||||
#define DEFINE_SCRIPT_PROXY_11V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 11 )
|
#define DEFINE_SCRIPT_PROXY_11V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 11 )
|
||||||
#define DEFINE_SCRIPT_PROXY_12V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 12 )
|
#define DEFINE_SCRIPT_PROXY_12V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 12 )
|
||||||
#define DEFINE_SCRIPT_PROXY_13V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 13 )
|
|
||||||
#define DEFINE_SCRIPT_PROXY_14V( FuncName ) DEFINE_SCRIPT_PROXY_GUTS_NO_RETVAL( FuncName, 14 )
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
#define FUNC_APPEND_PARAMS_10 pDesc->m_iParamCount = 10; pDesc->m_Parameters[0] = ScriptDeduceType( FUNC_ARG_TYPE_1 ); pDesc->m_Parameters[1] = ScriptDeduceType( FUNC_ARG_TYPE_2 ); pDesc->m_Parameters[2] = ScriptDeduceType( FUNC_ARG_TYPE_3 ); pDesc->m_Parameters[3] = ScriptDeduceType( FUNC_ARG_TYPE_4 ); pDesc->m_Parameters[4] = ScriptDeduceType( FUNC_ARG_TYPE_5 ); pDesc->m_Parameters[5] = ScriptDeduceType( FUNC_ARG_TYPE_6 ); pDesc->m_Parameters[6] = ScriptDeduceType( FUNC_ARG_TYPE_7 ); pDesc->m_Parameters[7] = ScriptDeduceType( FUNC_ARG_TYPE_8 ); pDesc->m_Parameters[8] = ScriptDeduceType( FUNC_ARG_TYPE_9 ); pDesc->m_Parameters[9] = ScriptDeduceType( FUNC_ARG_TYPE_10 );
|
#define FUNC_APPEND_PARAMS_10 pDesc->m_iParamCount = 10; pDesc->m_Parameters[0] = ScriptDeduceType( FUNC_ARG_TYPE_1 ); pDesc->m_Parameters[1] = ScriptDeduceType( FUNC_ARG_TYPE_2 ); pDesc->m_Parameters[2] = ScriptDeduceType( FUNC_ARG_TYPE_3 ); pDesc->m_Parameters[3] = ScriptDeduceType( FUNC_ARG_TYPE_4 ); pDesc->m_Parameters[4] = ScriptDeduceType( FUNC_ARG_TYPE_5 ); pDesc->m_Parameters[5] = ScriptDeduceType( FUNC_ARG_TYPE_6 ); pDesc->m_Parameters[6] = ScriptDeduceType( FUNC_ARG_TYPE_7 ); pDesc->m_Parameters[7] = ScriptDeduceType( FUNC_ARG_TYPE_8 ); pDesc->m_Parameters[8] = ScriptDeduceType( FUNC_ARG_TYPE_9 ); pDesc->m_Parameters[9] = ScriptDeduceType( FUNC_ARG_TYPE_10 );
|
||||||
#define FUNC_APPEND_PARAMS_11 pDesc->m_iParamCount = 11; pDesc->m_Parameters[0] = ScriptDeduceType( FUNC_ARG_TYPE_1 ); pDesc->m_Parameters[1] = ScriptDeduceType( FUNC_ARG_TYPE_2 ); pDesc->m_Parameters[2] = ScriptDeduceType( FUNC_ARG_TYPE_3 ); pDesc->m_Parameters[3] = ScriptDeduceType( FUNC_ARG_TYPE_4 ); pDesc->m_Parameters[4] = ScriptDeduceType( FUNC_ARG_TYPE_5 ); pDesc->m_Parameters[5] = ScriptDeduceType( FUNC_ARG_TYPE_6 ); pDesc->m_Parameters[6] = ScriptDeduceType( FUNC_ARG_TYPE_7 ); pDesc->m_Parameters[7] = ScriptDeduceType( FUNC_ARG_TYPE_8 ); pDesc->m_Parameters[8] = ScriptDeduceType( FUNC_ARG_TYPE_9 ); pDesc->m_Parameters[9] = ScriptDeduceType( FUNC_ARG_TYPE_10 ); pDesc->m_Parameters[10] = ScriptDeduceType( FUNC_ARG_TYPE_11 );
|
#define FUNC_APPEND_PARAMS_11 pDesc->m_iParamCount = 11; pDesc->m_Parameters[0] = ScriptDeduceType( FUNC_ARG_TYPE_1 ); pDesc->m_Parameters[1] = ScriptDeduceType( FUNC_ARG_TYPE_2 ); pDesc->m_Parameters[2] = ScriptDeduceType( FUNC_ARG_TYPE_3 ); pDesc->m_Parameters[3] = ScriptDeduceType( FUNC_ARG_TYPE_4 ); pDesc->m_Parameters[4] = ScriptDeduceType( FUNC_ARG_TYPE_5 ); pDesc->m_Parameters[5] = ScriptDeduceType( FUNC_ARG_TYPE_6 ); pDesc->m_Parameters[6] = ScriptDeduceType( FUNC_ARG_TYPE_7 ); pDesc->m_Parameters[7] = ScriptDeduceType( FUNC_ARG_TYPE_8 ); pDesc->m_Parameters[8] = ScriptDeduceType( FUNC_ARG_TYPE_9 ); pDesc->m_Parameters[9] = ScriptDeduceType( FUNC_ARG_TYPE_10 ); pDesc->m_Parameters[10] = ScriptDeduceType( FUNC_ARG_TYPE_11 );
|
||||||
#define FUNC_APPEND_PARAMS_12 pDesc->m_iParamCount = 12; pDesc->m_Parameters[0] = ScriptDeduceType( FUNC_ARG_TYPE_1 ); pDesc->m_Parameters[1] = ScriptDeduceType( FUNC_ARG_TYPE_2 ); pDesc->m_Parameters[2] = ScriptDeduceType( FUNC_ARG_TYPE_3 ); pDesc->m_Parameters[3] = ScriptDeduceType( FUNC_ARG_TYPE_4 ); pDesc->m_Parameters[4] = ScriptDeduceType( FUNC_ARG_TYPE_5 ); pDesc->m_Parameters[5] = ScriptDeduceType( FUNC_ARG_TYPE_6 ); pDesc->m_Parameters[6] = ScriptDeduceType( FUNC_ARG_TYPE_7 ); pDesc->m_Parameters[7] = ScriptDeduceType( FUNC_ARG_TYPE_8 ); pDesc->m_Parameters[8] = ScriptDeduceType( FUNC_ARG_TYPE_9 ); pDesc->m_Parameters[9] = ScriptDeduceType( FUNC_ARG_TYPE_10 ); pDesc->m_Parameters[10] = ScriptDeduceType( FUNC_ARG_TYPE_11 ); pDesc->m_Parameters[11] = ScriptDeduceType( FUNC_ARG_TYPE_12 );
|
#define FUNC_APPEND_PARAMS_12 pDesc->m_iParamCount = 12; pDesc->m_Parameters[0] = ScriptDeduceType( FUNC_ARG_TYPE_1 ); pDesc->m_Parameters[1] = ScriptDeduceType( FUNC_ARG_TYPE_2 ); pDesc->m_Parameters[2] = ScriptDeduceType( FUNC_ARG_TYPE_3 ); pDesc->m_Parameters[3] = ScriptDeduceType( FUNC_ARG_TYPE_4 ); pDesc->m_Parameters[4] = ScriptDeduceType( FUNC_ARG_TYPE_5 ); pDesc->m_Parameters[5] = ScriptDeduceType( FUNC_ARG_TYPE_6 ); pDesc->m_Parameters[6] = ScriptDeduceType( FUNC_ARG_TYPE_7 ); pDesc->m_Parameters[7] = ScriptDeduceType( FUNC_ARG_TYPE_8 ); pDesc->m_Parameters[8] = ScriptDeduceType( FUNC_ARG_TYPE_9 ); pDesc->m_Parameters[9] = ScriptDeduceType( FUNC_ARG_TYPE_10 ); pDesc->m_Parameters[10] = ScriptDeduceType( FUNC_ARG_TYPE_11 ); pDesc->m_Parameters[11] = ScriptDeduceType( FUNC_ARG_TYPE_12 );
|
||||||
#define FUNC_APPEND_PARAMS_13 static_assert(0, "Too many params");
|
|
||||||
#define FUNC_APPEND_PARAMS_14 static_assert(0, "Too many params");
|
|
||||||
|
|
||||||
#define DEFINE_NONMEMBER_FUNC_TYPE_DEDUCER(N) \
|
#define DEFINE_NONMEMBER_FUNC_TYPE_DEDUCER(N) \
|
||||||
template <typename FUNCTION_RETTYPE FUNC_TEMPLATE_FUNC_PARAMS_##N> \
|
template <typename FUNCTION_RETTYPE FUNC_TEMPLATE_FUNC_PARAMS_##N> \
|
||||||
@ -40,7 +38,22 @@
|
|||||||
++pDesc->m_iVariantCount; \
|
++pDesc->m_iVariantCount; \
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNC_GENERATE_ALL(DEFINE_NONMEMBER_FUNC_TYPE_DEDUCER);
|
#define VSCRIPT_FUNC_GENERATE_ALL(INNERMACRONAME) \
|
||||||
|
INNERMACRONAME(0); \
|
||||||
|
INNERMACRONAME(1); \
|
||||||
|
INNERMACRONAME(2); \
|
||||||
|
INNERMACRONAME(3); \
|
||||||
|
INNERMACRONAME(4); \
|
||||||
|
INNERMACRONAME(5); \
|
||||||
|
INNERMACRONAME(6); \
|
||||||
|
INNERMACRONAME(7); \
|
||||||
|
INNERMACRONAME(8); \
|
||||||
|
INNERMACRONAME(9); \
|
||||||
|
INNERMACRONAME(10);\
|
||||||
|
INNERMACRONAME(11);\
|
||||||
|
INNERMACRONAME(12);
|
||||||
|
|
||||||
|
VSCRIPT_FUNC_GENERATE_ALL(DEFINE_NONMEMBER_FUNC_TYPE_DEDUCER);
|
||||||
|
|
||||||
#define DEFINE_MEMBER_FUNC_TYPE_DEDUCER(N) \
|
#define DEFINE_MEMBER_FUNC_TYPE_DEDUCER(N) \
|
||||||
template <typename OBJECT_TYPE_PTR, typename FUNCTION_CLASS, typename FUNCTION_RETTYPE FUNC_TEMPLATE_FUNC_PARAMS_##N> \
|
template <typename OBJECT_TYPE_PTR, typename FUNCTION_CLASS, typename FUNCTION_RETTYPE FUNC_TEMPLATE_FUNC_PARAMS_##N> \
|
||||||
@ -53,7 +66,7 @@ FUNC_GENERATE_ALL(DEFINE_NONMEMBER_FUNC_TYPE_DEDUCER);
|
|||||||
++pDesc->m_iVariantCount; \
|
++pDesc->m_iVariantCount; \
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNC_GENERATE_ALL( DEFINE_MEMBER_FUNC_TYPE_DEDUCER );
|
VSCRIPT_FUNC_GENERATE_ALL( DEFINE_MEMBER_FUNC_TYPE_DEDUCER );
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
|
|
||||||
@ -68,7 +81,7 @@ FUNC_GENERATE_ALL( DEFINE_MEMBER_FUNC_TYPE_DEDUCER );
|
|||||||
++pDesc->m_iVariantCount; \
|
++pDesc->m_iVariantCount; \
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNC_GENERATE_ALL( DEFINE_CONST_MEMBER_FUNC_TYPE_DEDUCER );
|
VSCRIPT_FUNC_GENERATE_ALL( DEFINE_CONST_MEMBER_FUNC_TYPE_DEDUCER );
|
||||||
|
|
||||||
#define ScriptInitMemberFuncDescriptor_( pDesc, class, func, scriptName ) if ( 0 ) {} else { (pDesc)->m_pszScriptName = scriptName; (pDesc)->m_pszFunction = #func; ScriptDeduceFunctionSignature( pDesc, (class *)(0), &class::func ); }
|
#define ScriptInitMemberFuncDescriptor_( pDesc, class, func, scriptName ) if ( 0 ) {} else { (pDesc)->m_pszScriptName = scriptName; (pDesc)->m_pszFunction = #func; ScriptDeduceFunctionSignature( pDesc, (class *)(0), &class::func ); }
|
||||||
|
|
||||||
@ -414,7 +427,7 @@ inline FUNCPTR_TYPE ScriptConvertFuncPtrFromVoid( void *p )
|
|||||||
return &CMemberScriptBinding##N<OBJECT_TYPE_PTR, Func_t, FUNCTION_RETTYPE FUNC_BASE_TEMPLATE_FUNC_PARAMS_PASSTHRU_##N>::Call; \
|
return &CMemberScriptBinding##N<OBJECT_TYPE_PTR, Func_t, FUNCTION_RETTYPE FUNC_BASE_TEMPLATE_FUNC_PARAMS_PASSTHRU_##N>::Call; \
|
||||||
}
|
}
|
||||||
|
|
||||||
FUNC_GENERATE_ALL( DEFINE_SCRIPT_BINDINGS );
|
VSCRIPT_FUNC_GENERATE_ALL( DEFINE_SCRIPT_BINDINGS );
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user