Clean up PowInt docs.
[Math-GSL.git] / GSL.i
blob387d5bd3c79b220e67bb963957c77fd5e2f3f6f4
1 %typemap(in) double const [] {
2 AV *tempav;
3 I32 len;
4 int i;
5 SV **tv;
6 if (!SvROK($input))
7 croak("Math::GSL : $input is not a reference!");
8 if (SvTYPE(SvRV($input)) != SVt_PVAV)
9 croak("Math::GSL : $input is not an array ref!");
11 tempav = (AV*)SvRV($input);
12 len = av_len(tempav);
13 $1 = (double *) malloc((len+1)*sizeof(double));
14 for (i = 0; i <= len; i++) {
15 tv = av_fetch(tempav, i, 0);
16 $1[i] = (double) SvNV(*tv);
19 %apply double const [] { double *data };
20 %apply double const [] { double x[] };
22 %typemap(freearg) double const [] {
23 free($1);
27 %typemap(argout) double const [] {
28 printf("argout double const\n");