mirror of https://github.com/go-python/gopy.git
Increment reference count for results in genMethodBody.
This commit is contained in:
parent
c3392d2400
commit
b5e44cd754
|
@ -451,6 +451,13 @@ func (g *goGen) genMethodBody(s Struct, m Func) {
|
|||
return
|
||||
}
|
||||
|
||||
for i, res := range results {
|
||||
if !res.needWrap() {
|
||||
continue
|
||||
}
|
||||
g.Printf("cgopy_incref(unsafe.Pointer(&_gopy_%03d))\n", i)
|
||||
}
|
||||
|
||||
g.Printf("return ")
|
||||
for i, res := range results {
|
||||
if i > 0 {
|
||||
|
|
Loading…
Reference in New Issue