File: java_arrays.i

package info (click to toggle)
swig1.3 1.3.11-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 6,852 kB
  • ctags: 4,764
  • sloc: ansic: 20,489; cpp: 10,052; sh: 7,256; yacc: 2,669; makefile: 2,381; python: 873; java: 762; tcl: 686; perl: 474; lisp: 444; ruby: 370; php: 367
file content (16 lines) | stat: -rw-r--r-- 311 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* 
Support for setting values in arrays. This is intended to cover all types of arrays.
*/
%typemap(memberin) SWIGTYPE [] {
    int i;
    for (i=0; i<$dim0; i++) {
        $1[i] = $input[i];
    }
}
%typemap(globalin) SWIGTYPE [] {
    int i;
    for (i=0; i<$dim0; i++) {
        $1[i] = $input[i];
    }
}