diff --git a/src/NetVips/Internal/GObject.cs b/src/NetVips/Internal/GObject.cs index 1c764726..f919d7a7 100644 --- a/src/NetVips/Internal/GObject.cs +++ b/src/NetVips/Internal/GObject.cs @@ -15,7 +15,7 @@ internal static class GObject [StructLayout(LayoutKind.Sequential)] internal struct Struct { - internal GType.Instance GTypeInstance; + internal IntPtr GTypeInstance; internal uint RefCount; @@ -76,12 +76,6 @@ internal struct GEnumClass internal static class GType { - [StructLayout(LayoutKind.Sequential)] - internal struct Instance - { - internal IntPtr GClass; - } - [SuppressUnmanagedCodeSecurity] [DllImport(Libraries.GObject, CallingConvention = CallingConvention.Cdecl, EntryPoint = "g_type_name")] @@ -218,7 +212,7 @@ internal static class GParamSpec [StructLayout(LayoutKind.Sequential)] internal struct Struct { - internal GType.Instance GTypeInstance; + internal IntPtr GTypeInstance; internal IntPtr Name; diff --git a/src/NetVips/Internal/Vips.cs b/src/NetVips/Internal/Vips.cs index fe1572fe..ecd355ad 100644 --- a/src/NetVips/Internal/Vips.cs +++ b/src/NetVips/Internal/Vips.cs @@ -260,16 +260,10 @@ internal static extern int SetFromString(VipsObjectManaged @object, internal static extern IntPtr GetDescription(VipsObjectManaged @object); } - [StructLayout(LayoutKind.Sequential)] - internal struct VipsArgument - { - internal IntPtr Pspec; - } - [StructLayout(LayoutKind.Sequential)] internal struct VipsArgumentClass { - internal VipsArgument Parent; + internal IntPtr Parent; internal IntPtr ObjectClass; internal ArgumentFlags Flags; @@ -280,7 +274,7 @@ internal struct VipsArgumentClass [StructLayout(LayoutKind.Sequential)] internal struct VipsArgumentInstance { - internal VipsArgument Parent; + internal IntPtr Parent; internal IntPtr ArgumentClass; internal IntPtr Object; diff --git a/src/NetVips/VipsProgress.cs b/src/NetVips/VipsProgress.cs index b0b4a53d..a086d224 100644 --- a/src/NetVips/VipsProgress.cs +++ b/src/NetVips/VipsProgress.cs @@ -66,6 +66,11 @@ public struct VipsProgress /// /// Start time. /// - public GTimer Start; + private IntPtr StartPtr; + + /// + /// Start time. + /// + public GTimer Start => Marshal.PtrToStructure(StartPtr); } } \ No newline at end of file