scilab: fix primitive_types test regression
This commit is contained in:
parent
542abaf846
commit
9432da4b34
1 changed files with 16 additions and 1 deletions
|
|
@ -11,7 +11,9 @@
|
||||||
long&, unsigned long&, signed long&,
|
long&, unsigned long&, signed long&,
|
||||||
short&, unsigned short&, signed short&,
|
short&, unsigned short&, signed short&,
|
||||||
long long&, unsigned long long&,
|
long long&, unsigned long long&,
|
||||||
unsigned char&, signed char& {
|
unsigned char&, signed char&,
|
||||||
|
size_t, size_t&,
|
||||||
|
ptrdiff_t, ptrdiff_t& {
|
||||||
char obj[20];
|
char obj[20];
|
||||||
sprintf(obj, "%d", $1);
|
sprintf(obj, "%d", $1);
|
||||||
%raise(obj, "$type", $descriptor);
|
%raise(obj, "$type", $descriptor);
|
||||||
|
|
@ -30,10 +32,23 @@
|
||||||
%raise(obj, "$type", $descriptor);
|
%raise(obj, "$type", $descriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%typemap(throws, noblock=1) bool, bool& {
|
||||||
|
%raise($1 ? "true" : "false", "$type", $descriptor);
|
||||||
|
}
|
||||||
|
|
||||||
%typemap(throws, noblock=1) char*, char[ANY] {
|
%typemap(throws, noblock=1) char*, char[ANY] {
|
||||||
%raise($1, "$type", $descriptor);
|
%raise($1, "$type", $descriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%typemap(throws, noblock=1) char, char& {
|
||||||
|
char obj[1];
|
||||||
|
sprintf(obj, "%c", $1);
|
||||||
|
%raise(obj, "$type", $descriptor);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%typemap(throws, noblock=1) SWIGTYPE,
|
%typemap(throws, noblock=1) SWIGTYPE,
|
||||||
SWIGTYPE*,
|
SWIGTYPE*,
|
||||||
SWIGTYPE [ANY],
|
SWIGTYPE [ANY],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue