Octave - SWIG now marshalls a C/C++ NULL pointer into the null matrix, []
SWIG has always marshalled the null matrix into a NULL pointer; this remains and now we have consistency in representing a NULL pointer. This is a pre-requisite for a pending commit to fully support std::unique_ptr.
This commit is contained in:
parent
2cfd77b1c0
commit
ca9eebcb8d
4 changed files with 27 additions and 5 deletions
|
|
@ -6,3 +6,13 @@ endif
|
|||
null_pointer;
|
||||
|
||||
assert(funk([]));
|
||||
null_ptr = getnull();
|
||||
assert(ismatrix(null_ptr))
|
||||
assert(size(null_ptr) == size([]))
|
||||
assert(isequal([], null_ptr))
|
||||
|
||||
# Can't use isnull as a test due to null matrix not being copyable...
|
||||
# n = []
|
||||
# isnull(n) # ans = 0
|
||||
# isnull([]) # ans = 1
|
||||
# isnull(getnull()) # ans = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue