Open lshoravi opened 2 years ago
This is expected behaviour. We don't maintain a mapping of SCM objects to GObjects, because doing so would make the GC<->refcount translation much more tedious. Instead, each time you receive an object from a GI context, we allocate a new SCM pointer, which calls unref upon being freed and depending on the transfer call ref on the structure. If you want to do comparisons, you'll have to compare the value slots.
What is a bug here, though, is that equal?
is not defined for <GObject>
, perhaps even <GFundamental>
. IIUC it should be defined as (equal? (fiddle pointer-address object-a) (fiddle pointer-address object-b))
.
Trying to compare two widgets for equal identity:
However, the if-clause will always return
#f
, becauseget-focus-child
seemingly always gives fresh references which hence are nevereq?
orequal?
Is this a bug, or expected behaviour?