From 64f3f78c0f156b5a2b49931037f712cf2ab93be4 Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Thu, 22 Jul 2021 19:40:38 +0600 Subject: [PATCH] Address PR feedback --- Source/Libs/GLibSharp/HookList.cs | 2 +- Source/Tools/GapiCodegen/GenerationInfo.cs | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Source/Libs/GLibSharp/HookList.cs b/Source/Libs/GLibSharp/HookList.cs index 3498454f5..7af30e4e3 100644 --- a/Source/Libs/GLibSharp/HookList.cs +++ b/Source/Libs/GLibSharp/HookList.cs @@ -31,7 +31,7 @@ namespace GLib { ), new GLib.AbiField("is_setup" , -1 - , (uint) sizeof(uint) // is_setup + , (uint) Marshal.SizeOf() // is_setup , "hook_size" , "hooks" , 1 diff --git a/Source/Tools/GapiCodegen/GenerationInfo.cs b/Source/Tools/GapiCodegen/GenerationInfo.cs index 6ced13550..6ef86b008 100644 --- a/Source/Tools/GapiCodegen/GenerationInfo.cs +++ b/Source/Tools/GapiCodegen/GenerationInfo.cs @@ -253,10 +253,6 @@ namespace GtkSharp.Generation { if (isBlittable) return "sizeof( " + cstype + " )"; - // This is optimization based on https://github.com/GtkSharp/GtkSharp/pull/261#discussion_r673381869 - if (cstype == "bool") - return "sizeof( uint )"; - return "Marshal.SizeOf<" + cstype + ">()"; } }