From ec696f7bab9c792854c4e2845128b915cfbc2d84 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Thu, 24 Oct 2024 00:52:29 +0100 Subject: [PATCH] Remove `[NativeTypeName("unsigned int")]` This would appear a lot when bindgen is run on Linux (underlying enum type is unsigned int). --- SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs | 2 +- SDL3-CS/generate_bindings.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs index 6dc9b96..945a0a3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_stdinc.g.cs @@ -338,7 +338,7 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_uitoa", ExactSpelling = true)] [return: NativeTypeName("char *")] - public static extern byte* Unsafe_SDL_uitoa([NativeTypeName("unsigned int")] uint value, [NativeTypeName("char *")] byte* str, int radix); + public static extern byte* Unsafe_SDL_uitoa(uint value, [NativeTypeName("char *")] byte* str, int radix); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_ltoa", ExactSpelling = true)] [return: NativeTypeName("char *")] diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index fa06475..de2485d 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -261,6 +261,9 @@ base_command = [ "wchar_t *=IntPtr", # wchar_t has a platform-defined size "bool=SDLBool", # treat bool as C# helper type + "--nativeTypeNamesToStrip", + "unsigned int", + "--define-macro", "SDL_FUNCTION_POINTER_IS_VOID_POINTER",