git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7956 626c5289-ae23-0410-ae9c-e8d60b6d4f22
25 lines
286 B
Python
25 lines
286 B
Python
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.thisown:
|
|
raise RuntimeError
|