Skip to content

Commit ff011a4

Browse files
vargazshana
authored andcommitted
Avoid initializing the vtable when creating an object, the c++ constructor already does it, an
d the value we were trying to set was incorrect for qt.
1 parent c6c8291 commit ff011a4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Mono.VisualC.Interop/ABI/CppAbi.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,10 @@ protected virtual void EmitConstruct (ILGenerator il, MethodInfo nativeMethod, T
430430
LocalBuilder nativePtr)
431431
{
432432
EmitCallNative (il, nativeMethod, false, parameterTypes, nativePtr);
433-
EmitInitVTable (il, nativePtr);
433+
//
434+
// FIXME: Why is this needed ? When using the itanium abi, the c++ ctor
435+
// initalizes it. Maybe msvc needs it ?
436+
//EmitInitVTable (il, nativePtr);
434437
}
435438

436439
protected virtual void EmitDestruct (ILGenerator il, MethodInfo nativeMethod, Type [] parameterTypes,

0 commit comments

Comments
 (0)