From 4832d5d648cee682f970cbb1c25e553b120fb792 Mon Sep 17 00:00:00 2001 From: triton Date: Wed, 27 Feb 2013 01:55:04 +0000 Subject: [PATCH] Walk through typedefs when checking for void pointers. --- src/Generator/Generators/CLI/CLIMarshal.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Generator/Generators/CLI/CLIMarshal.cs b/src/Generator/Generators/CLI/CLIMarshal.cs index 52cdad5f..f5d6ebb8 100644 --- a/src/Generator/Generators/CLI/CLIMarshal.cs +++ b/src/Generator/Generators/CLI/CLIMarshal.cs @@ -50,9 +50,9 @@ namespace Cxxi.Generators.CLI { var pointee = pointer.Pointee; - if (pointee.IsPrimitiveType(PrimitiveType.Void)) + if (pointee.IsPrimitiveType(PrimitiveType.Void, walkTypedefs: true)) { - Return.Write("IntPtr()"); + Return.Write("IntPtr({0})", Context.ReturnVarName); return true; }