Add test and changes entry for Python -builtin %array_class fix
Issue https://github.com/swig/swig/issues/446
This commit is contained in:
parent
b630cc603c
commit
173c028dd4
9 changed files with 51 additions and 8 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
%array_functions(int,intArray);
|
||||
%array_class(double, doubleArray);
|
||||
%array_class(short, shortArray);
|
||||
|
||||
%inline %{
|
||||
typedef struct {
|
||||
|
|
@ -26,3 +27,13 @@ AB globalABArray[3];
|
|||
%array_class(XY, XYArray)
|
||||
%array_functions(AB, ABArray)
|
||||
|
||||
%inline %{
|
||||
short sum_array(short x[5]) {
|
||||
short sum = 0;
|
||||
int i;
|
||||
for (i=0; i<5; i++) {
|
||||
sum = sum + x[i];
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue