Address PR feedback

This commit is contained in:
Andrii Kurdiumov 2021-07-22 19:40:38 +06:00
parent 1b73bc8042
commit 64f3f78c0f
2 changed files with 1 additions and 5 deletions

View file

@ -31,7 +31,7 @@ namespace GLib {
), ),
new GLib.AbiField("is_setup" new GLib.AbiField("is_setup"
, -1 , -1
, (uint) sizeof(uint) // is_setup , (uint) Marshal.SizeOf<bool>() // is_setup
, "hook_size" , "hook_size"
, "hooks" , "hooks"
, 1 , 1

View file

@ -253,10 +253,6 @@ namespace GtkSharp.Generation {
if (isBlittable) if (isBlittable)
return "sizeof( " + cstype + " )"; 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 + ">()"; return "Marshal.SizeOf<" + cstype + ">()";
} }
} }