Skip to content

Commit 0309d2d

Browse files
committed
fix missing goRef function
1 parent ea70551 commit 0309d2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bridge.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ func (f *valueFold) goRef() C.GoRef {
219219

220220
// destroyRef remove the valueFold reference from the lookup table.
221221
func (f *valueFold) destroyRef() {
222-
ref := goRef(f)
222+
ref := C.GoRef(uintptr(unsafe.Pointer(f)))
223223
delete(cgoFolds, ref)
224224
}
225225

qml.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ func (obj *Common) On(signal string, function interface{}) {
800800
csignal, csignallen := unsafeStringData(signal)
801801
var cerr *C.error
802802
RunMain(func() {
803-
funcr := goRef(function)
803+
funcr := C.GoRef(uintptr(unsafe.Pointer(&function)))
804804
cerr = C.objectConnect(obj.addr, csignal, csignallen, obj.engine.addr, funcr, C.int(funcv.Type().NumIn()))
805805
if cerr == nil {
806806
connectedFunction[funcr] = function

0 commit comments

Comments
 (0)