2022-09-22 08:56:07 +08:00
|
|
|
#include "ReversePInvokeMethodStub.h"
|
|
|
|
#include "MetadataModule.h"
|
|
|
|
|
|
|
|
namespace hybridclr
|
|
|
|
{
|
|
|
|
namespace metadata
|
|
|
|
{
|
|
|
|
|
|
|
|
void CallLuaFunction(void* xState, int32_t wrapperIndex)
|
|
|
|
{
|
|
|
|
const MethodInfo* method = MetadataModule::GetMethodInfoByReversePInvokeWrapperIndex(wrapperIndex);
|
|
|
|
typedef void (*Callback)(void* xState, const MethodInfo* method);
|
2022-10-14 16:15:18 +08:00
|
|
|
((Callback)(method->methodPointerCallByInterp))(xState, method);
|
2022-09-22 08:56:07 +08:00
|
|
|
}
|
|
|
|
|
2022-10-14 16:15:18 +08:00
|
|
|
//!!!{{REVERSE_PINVOKE_METHOD_STUB
|
|
|
|
|
2022-09-22 08:56:07 +08:00
|
|
|
void __ReversePInvokeMethod_0(void* xState)
|
|
|
|
{
|
|
|
|
CallLuaFunction(xState, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
void __ReversePInvokeMethod_1(void* xState)
|
|
|
|
{
|
|
|
|
CallLuaFunction(xState, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
Il2CppMethodPointer s_ReversePInvokeMethodStub[]
|
|
|
|
{
|
|
|
|
(Il2CppMethodPointer)__ReversePInvokeMethod_0,
|
|
|
|
(Il2CppMethodPointer)__ReversePInvokeMethod_1,
|
|
|
|
nullptr,
|
|
|
|
};
|
|
|
|
|
|
|
|
//!!!}}REVERSE_PINVOKE_METHOD_STUB
|
|
|
|
}
|
|
|
|
}
|