WSTester updated to work plus hopefully all the other changes that need to go into...
[jabaws.git] / binaries / src / ViennaRNA / RNAforester / g2-0.70 / g2_perl / typemap
1 enum QPshape                                    T_PTROBJ
2 G2::Device                                      T_PTROBJ
3 double *                                        T_dbl_array
4
5 INPUT
6 T_dbl_array
7        {        
8        AV *tempav;
9        I32 len;
10        int i;
11        SV  **tv;
12              if (!SvROK($arg)) {
13                  croak(\"$arg is not a reference.\");
14              }
15              if (SvTYPE(SvRV($arg)) != SVt_PVAV) {
16                  croak(\"$arg is not an array.\");
17              }
18              tempav = (AV*)SvRV($arg);
19              len = av_len(tempav)+1;
20              $var = (double *) malloc(len*sizeof(double));
21              for (i=0;i<len;i++) {
22                 {
23                  tv = av_fetch(tempav, i, 0);        
24                  ${var}[i] = (double) SvNV(*tv);
25                 }
26              }
27         }
28