+ finally fix pointers to member functions in chicken
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7705 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
356a883342
commit
44df9d121a
4 changed files with 80 additions and 0 deletions
|
|
@ -48,4 +48,17 @@
|
|||
(Bar-global-fval (make <Foo> -34))
|
||||
(check (= (slot-ref (Bar-global-fval) 'num) -34))
|
||||
|
||||
;; Now test function pointers
|
||||
(define func1ptr (get-func1-ptr))
|
||||
(define func2ptr (get-func2-ptr))
|
||||
|
||||
(slot-set! f 'num 4)
|
||||
(check (= (func1 f 2) 16))
|
||||
(check (= (func2 f 2) -8))
|
||||
|
||||
(slot-set! f 'func-ptr func1ptr)
|
||||
(check (= (test-func-ptr f 2) 16))
|
||||
(slot-set! f 'func-ptr func2ptr)
|
||||
(check (= (test-func-ptr f 2) -8))
|
||||
|
||||
(exit 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue