summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pirotte <david@altosw.be>2023-10-29 00:57:27 -0300
committerDavid Pirotte <david@altosw.be>2023-10-29 00:57:27 -0300
commitb0a4ff25bd02f9726f4e912127c146bc33f8087a (patch)
treea89dd2cbb382e8f9907d6ca78506b2a0f8f3e39d
parentdc9ff1f25279749eb049043f8d9247e50559927c (diff)
Fixing signal-emit (extra) arg(s) handling
* g-golf/hl-api/closure.scm (prepare-g-value-in): This procedure is actually shared between the (g-golf hl-api closure) invoke method and the (g-golf hl-api signal) signal-emit procedure. Wrt to the later case, the type it receives is always a symbol, 'object for a gobject subclass instance - not the goops proxy class instance - which is missing and raises an exception in calls like: (emit window 'add-toast toast) where window and toast are goops proxy instances. Fixed.
-rw-r--r--g-golf/hl-api/closure.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/g-golf/hl-api/closure.scm b/g-golf/hl-api/closure.scm
index fb665ca..d47e01f 100644
--- a/g-golf/hl-api/closure.scm
+++ b/g-golf/hl-api/closure.scm
@@ -201,6 +201,10 @@
(g-value-set! g-value (scm->gi val 'pointer)))
#;((boxed))
#;((param))
+ ((eq? type 'object)
+ (let ((g-type (!g-type (class-of val))))
+ (%g_value_init g-value g-type)
+ (g-value-set! g-value (!g-inst val))))
((gobject-class? type)
(%g_value_init g-value (!g-type type))
(g-value-set! g-value (!g-inst val)))