1 %module
"Math::GSL::NTuple"
3 %include
"gsl_typemaps.i"
5 // XXX
: This needs to properly take the type of array into account
,
7 %typemap
(in
) void
*ntuple_data
{
13 //fprintf
(stderr
,"symname=$symname \n");
16 croak
("Math::GSL::NTuple : $1_name is not a reference!");
18 if
(SvTYPE
(SvRV
($input
)) != SVt_PVAV
)
19 croak
("Math::GSL::NTuple : $1_name is not an array ref!");
21 tempav
= (AV
*)SvRV
($input
);
24 $
1 = (int
**) malloc
((len
+1)*sizeof
(int
*));
25 for
(i
= 0; i
<= len
; i
++) {
26 tv
= av_fetch
(tempav
, i
, 0);
27 memset
((int
*)($
1+i
), SvIV
(*tv
) , sizeof
(int
*));
32 %typemap
(argout
) void
*ntuple_data
{
36 %typemap
(freearg
) void
*ntuple_data
{
41 #include
"gsl/gsl_ntuple.h"
42 #include
"gsl/gsl_errno.h"
43 #include
"gsl/gsl_histogram.h"
46 %include
"gsl/gsl_ntuple.h"
47 %include
"gsl/gsl_histogram.h"
49 %include
"../pod/NTuple.pod"