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:
Marcelo Matus 2005-12-09 01:12:26 +00:00
commit 2a172ffc8a
3 changed files with 58 additions and 12 deletions

View file

@ -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