From 065b8054b2547f04b66ee5b64332ecb56a959548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Krog?= Date: Wed, 19 Feb 2014 21:24:49 +0100 Subject: [PATCH] Add PrimitiveType.UIntPtr in AST and code generators --- src/AST/Type.cs | 1 + src/Generator/Generators/CLI/CLITypePrinter.cs | 1 + src/Generator/Generators/CSharp/CSharpTypePrinter.cs | 1 + src/Generator/Types/CppTypePrinter.cs | 1 + 4 files changed, 4 insertions(+) diff --git a/src/AST/Type.cs b/src/AST/Type.cs index c51cb6df..9ac5f201 100644 --- a/src/AST/Type.cs +++ b/src/AST/Type.cs @@ -818,6 +818,7 @@ namespace CppSharp.AST Float, Double, IntPtr, + UIntPtr, Char16 } diff --git a/src/Generator/Generators/CLI/CLITypePrinter.cs b/src/Generator/Generators/CLI/CLITypePrinter.cs index 00a9bb83..60e99f98 100644 --- a/src/Generator/Generators/CLI/CLITypePrinter.cs +++ b/src/Generator/Generators/CLI/CLITypePrinter.cs @@ -184,6 +184,7 @@ namespace CppSharp.Generators.CLI case PrimitiveType.Float: return "float"; case PrimitiveType.Double: return "double"; case PrimitiveType.IntPtr: return "IntPtr"; + case PrimitiveType.UIntPtr: return "UIntPtr"; } throw new NotSupportedException(); diff --git a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs index 81937138..50aaa953 100644 --- a/src/Generator/Generators/CSharp/CSharpTypePrinter.cs +++ b/src/Generator/Generators/CSharp/CSharpTypePrinter.cs @@ -380,6 +380,7 @@ namespace CppSharp.Generators.CSharp case PrimitiveType.Float: return "float"; case PrimitiveType.Double: return "double"; case PrimitiveType.IntPtr: return "global::System.IntPtr"; + case PrimitiveType.UIntPtr: return "global::System.UIntPtr"; } throw new NotSupportedException(); diff --git a/src/Generator/Types/CppTypePrinter.cs b/src/Generator/Types/CppTypePrinter.cs index 98f1c277..f8083593 100644 --- a/src/Generator/Types/CppTypePrinter.cs +++ b/src/Generator/Types/CppTypePrinter.cs @@ -111,6 +111,7 @@ namespace CppSharp.Types case PrimitiveType.Float: return "float"; case PrimitiveType.Double: return "double"; case PrimitiveType.IntPtr: return "void*"; + case PrimitiveType.UIntPtr: return "uintptr_t"; } throw new NotSupportedException();