[fix] 修复ReversePInvokeWrapper生成的bug
parent
e3095ccc01
commit
4a00e944a6
|
@ -5,15 +5,16 @@ namespace hybridclr
|
|||
{
|
||||
namespace metadata
|
||||
{
|
||||
//!!!{{REVERSE_PINVOKE_METHOD_STUB
|
||||
|
||||
void CallLuaFunction(void* xState, int32_t wrapperIndex)
|
||||
{
|
||||
const MethodInfo* method = MetadataModule::GetMethodInfoByReversePInvokeWrapperIndex(wrapperIndex);
|
||||
typedef void (*Callback)(void* xState, const MethodInfo* method);
|
||||
((Callback)GetInterpreterDirectlyCallMethodPointer(method))(xState, method);
|
||||
((Callback)(method->methodPointerCallByInterp))(xState, method);
|
||||
}
|
||||
|
||||
//!!!{{REVERSE_PINVOKE_METHOD_STUB
|
||||
|
||||
void __ReversePInvokeMethod_0(void* xState)
|
||||
{
|
||||
CallLuaFunction(xState, 0);
|
||||
|
|
|
@ -15,15 +15,6 @@ namespace HybridCLR.Editor.ReversePInvokeWrap
|
|||
var frr = new FileRegionReplace(template);
|
||||
var codes = new List<string>();
|
||||
|
||||
codes.Add(@"
|
||||
void CallLuaFunction(void* xState, int32_t wrapperIndex)
|
||||
{
|
||||
const MethodInfo* method = MetadataModule::GetMethodInfoByReversePInvokeWrapperIndex(wrapperIndex);
|
||||
typedef void (*Callback)(void* xState, const MethodInfo* method);
|
||||
((Callback)GetInterpreterDirectlyCallMethodPointer(method))(xState, method);
|
||||
}
|
||||
");
|
||||
|
||||
for(int i = 0; i < wrapperCount; i++)
|
||||
{
|
||||
codes.Add($@"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.focus-creative-games.hybridclr_unity",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"displayName": "HybridCLR",
|
||||
"description": "Unity package for HybridCLR. It includes editor and runtime scripts and assets for HybridCLR",
|
||||
"category": "Runtime",
|
||||
|
|
Loading…
Reference in New Issue