add support for accessing 'self.thisown'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7956 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c6c4de52d3
commit
2a172ffc8a
3 changed files with 58 additions and 12 deletions
|
|
@ -1,9 +1,25 @@
|
|||
from disown import *
|
||||
|
||||
a = A()
|
||||
|
||||
tmp = a.thisown
|
||||
|
||||
a.thisown = 0
|
||||
if a.thisown:
|
||||
raise RuntimeError
|
||||
|
||||
a.thisown = 1
|
||||
if (not a.thisown):
|
||||
raise RuntimeError
|
||||
|
||||
a.thisown = tmp
|
||||
if (a.thisown != tmp):
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
b = B()
|
||||
|
||||
b.acquire(a)
|
||||
|
||||
if a.this.own():
|
||||
if a.thisown:
|
||||
raise RuntimeError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue