sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

Workaround for issue #245 #251

Closed shumatech closed 3 years ago

shumatech commented 3 years ago

Fixes "cannot use _cgo1 (type *_Ctype_HWINDOW) as type **_Ctype_struct__GtkWidget in argument to _Cfunc_SciterGetElementHwnd" error in go 1.15. This defines an explicit pointer type for HWINDOW* that is used to cast from the unsafe pointer that the cgo compiler is happy converting to a GtkWidget** for the function call.

pravic commented 3 years ago

A reminder for me to test this.

ACLzz commented 3 years ago

Can you review it? It is only 4 strings, but you still haven't merged it

ACLzz commented 3 years ago

I'm trying to use the fix with that go.mod, but it throws me errors

go: found github.com/sciter-sdk/go-sciter in github.com/sciter-sdk/go-sciter v0.0.0-00010101000000-000000000000
go: found github.com/sciter-sdk/go-sciter/window in github.com/sciter-sdk/go-sciter v0.0.0-00010101000000-000000000000
go: github.com/shumatech/go-sciter@v0.5.1-0.20200928005155-90bed320196c used for two different module paths (github.com/sciter-sdk/go-sciter and github.com/shumatech/go-sciter)

I'm new in go, can you help me replace it right?

topxeq commented 3 years ago

Please finish the review and release the new version, so we can use it again, thanks.

pravic commented 3 years ago

Can anyone confirm that the issue is still present? If yes, what are the Go and Mingw versions? Can't reproduce it, see #245.