mirror of
https://github.com/ziutek/glib.git
synced 2025-09-27 03:36:01 +08:00
Fixed checking of signal source type in connect method
This commit is contained in:
@@ -225,6 +225,11 @@ param0 interface{}) {
|
||||
if noi {
|
||||
// There is no instance on which signal was emited as first parameter
|
||||
poffset--
|
||||
} else if !o.Type().Match(ft.In(poffset - 1)) {
|
||||
panic(fmt.Sprintf(
|
||||
"Callback #%d param. type %s doesn't match signal source: %s",
|
||||
poffset-1, ft.In(poffset-1), o.Type(),
|
||||
))
|
||||
}
|
||||
n_params := int(sq.n_params)
|
||||
if ft.NumIn() != n_params+poffset {
|
||||
@@ -242,7 +247,7 @@ param0 interface{}) {
|
||||
if !pt[i].Match(ft.In(i + poffset)) {
|
||||
panic(fmt.Sprintf(
|
||||
"Callback #%d param. type %s doesn't match signal spec %s",
|
||||
i+1, ft.In(i+poffset), pt[i],
|
||||
i+poffset, ft.In(i+poffset), pt[i],
|
||||
))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user