From 449777e24588360129e4357f5d84b5ee22a83a58 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Mon, 9 Sep 2013 18:26:26 +0300 Subject: [PATCH] Replaced a hard-coded variable name. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 0076458c..941f5590 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1567,9 +1567,10 @@ namespace CppSharp.Generators.CSharp PopBlock(NewLineKind.BeforeNextBlock); } - private void GenerateVirtualTableFunctionCall(Method method, Class @class) + private void GenerateVirtualTableFunctionCall(Function method, Class @class) { - WriteLine("void* vtable = *((void**) __Instance.ToPointer());"); + WriteLine("void* vtable = *((void**) {0}.ToPointer());", + Helpers.InstanceIdentifier); int i; switch (Driver.Options.Abi) {