git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12108 626c5289-ae23-0410-ae9c-e8d60b6d4f22
28 lines
381 B
Go
28 lines
381 B
Go
package main
|
|
|
|
import . "./director_thread"
|
|
|
|
type Derived struct {
|
|
abi Foo
|
|
} // From Foo
|
|
func (p *Derived) Do_foo() {
|
|
p.abi.SetVal(p.abi.GetVal() - 1)
|
|
}
|
|
|
|
func main() {
|
|
|
|
// FIXME: This test fails until we fix callbacks from a
|
|
// different thread.
|
|
return
|
|
|
|
p := &Derived{nil}
|
|
d := NewDirectorFoo(p)
|
|
p.abi = d
|
|
d.Run()
|
|
|
|
if d.GetVal() >= 0 {
|
|
panic(d.GetVal())
|
|
}
|
|
|
|
d.Stop()
|
|
}
|