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
diff --git a/binaries/src/ViennaRNA/RNAforester/g2-0.70/g2_perl/typemap b/binaries/src/ViennaRNA/RNAforester/g2-0.70/g2_perl/typemap
new file mode 100644 (file)
index 0000000..837edca
--- /dev/null
@@ -0,0 +1,28 @@
+enum QPshape                                   T_PTROBJ
+G2::Device                                     T_PTROBJ
+double *                                       T_dbl_array
+
+INPUT
+T_dbl_array
+       {       
+       AV *tempav;
+       I32 len;
+       int i;
+       SV  **tv;
+             if (!SvROK($arg)) {
+                croak(\"$arg is not a reference.\");
+            }
+             if (SvTYPE(SvRV($arg)) != SVt_PVAV) {
+                croak(\"$arg is not an array.\");
+            }
+             tempav = (AV*)SvRV($arg);
+             len = av_len(tempav)+1;
+             $var = (double *) malloc(len*sizeof(double));
+             for (i=0;i<len;i++) {
+               {
+                 tv = av_fetch(tempav, i, 0);        
+                 ${var}[i] = (double) SvNV(*tv);
+               }
+             }
+       }
+