mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings: return nil Qt objects as Go nil objects
This commit is contained in:
parent
789d530398
commit
de0fb12cfe
@ -327,6 +327,9 @@ import "C"
|
||||
|
||||
ret.WriteString(`
|
||||
func new` + goClassName + `(h *C.` + goClassName + `) *` + goClassName + ` {
|
||||
if h == nil {
|
||||
return nil
|
||||
}
|
||||
return &` + goClassName + `{` + localInit + `}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user