File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ subroutine test_standard
56
56
ASSERT(.not. btest (b% swigdata% cmemflags, swig_cmem_rvalue_bit))
57
57
ASSERT(foo_counter == 3 )
58
58
59
+ ! Return null
60
+ call b% release()
61
+ b = get_null()
62
+ ASSERT(.not. c_associated(b% swigdata% cptr))
63
+
59
64
! Capture from function
60
65
b = make_foo(6 )
61
66
ASSERT(btest (b% swigdata% cmemflags, swig_cmem_own_bit))
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Foo& reference(Foo& other) { return other; }
43
43
const Foo& const_reference (const Foo& other) { return other; }
44
44
Foo make_foo (int val) { return Foo (val); }
45
45
Foo make_foo_subroutine (int val) { return Foo (val); }
46
+ Foo* get_null () { return NULL ; }
46
47
47
48
int get_value (const Foo& other) { return other.val ; }
48
49
int get_value_copy (Foo other) { return other.val ; }
You can’t perform that action at this time.
0 commit comments