From a26bad5c4c5139504f1dc8b8805cce9b81d29e39 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Wed, 20 Jul 2022 10:18:42 +0200 Subject: [PATCH] Fix `var_dump()` of instances --- src/Config.php | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/Config.php b/src/Config.php index 91c19ce..629915b 100644 --- a/src/Config.php +++ b/src/Config.php @@ -346,6 +346,20 @@ private static function init(): void typedef int64_t gint64; typedef $gtype GType; + +typedef struct _GData GData; + +typedef struct _GTypeClass GTypeClass; + +typedef struct _GTypeInstance { + GTypeClass *g_class; +} GTypeInstance; + +typedef struct _GObject { + GTypeInstance g_type_instance; + unsigned int ref_count; + GData *qdata; +} GObject; EOS; // GLib declarations @@ -361,14 +375,6 @@ private static function init(): void guint64 data[2]; } GValue; -typedef struct _GData GData; - -typedef struct _GTypeClass GTypeClass; - -typedef struct _GTypeInstance { - GTypeClass *g_class; -} GTypeInstance; - typedef struct _GParamSpec { GTypeInstance g_type_instance; @@ -386,12 +392,6 @@ private static function init(): void unsigned int param_id; } GParamSpec; -typedef struct _GObject { - GTypeInstance g_type_instance; - unsigned int ref_count; - GData *qdata; -} GObject; - const char* g_type_name (GType gtype); GType g_type_from_name (const char* name); @@ -478,8 +478,7 @@ private static function init(): void typedef struct _VipsImage VipsImage; typedef struct _VipsProgress VipsProgress; -// Defined in GObject, just typedef to void* -typedef void* GObject; +// Defined in GObject, just typedef to void typedef void GParamSpec; typedef void GValue;