scilab: add pointer conversion builtin functions swig_this & swig_ptr
This commit is contained in:
parent
b58d996743
commit
675c4cee0f
5 changed files with 97 additions and 7 deletions
16
Examples/test-suite/scilab_pointer_conversion_functions.i
Normal file
16
Examples/test-suite/scilab_pointer_conversion_functions.i
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
%module scilab_pointer_conversion_functions
|
||||
|
||||
%inline %{
|
||||
|
||||
void* getNull() { return NULL; }
|
||||
bool isNull(void *p) { return p == NULL; }
|
||||
|
||||
int foo = 3;
|
||||
int *pfoo = &foo;
|
||||
|
||||
unsigned long getFooAddress() { return (unsigned long) pfoo; }
|
||||
bool equalFooPointer(void *p) { return p == pfoo; }
|
||||
|
||||
%}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue