gsl/XS
[email protected] (Patrick Dupre)
| Newsgroups | perl.xs |
|---|---|
| Message-ID | <[email protected]> |
Hello,
Can somebody could tell me what is wrong in this code:
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
//#include <gsl/gsl.h>
#include <stdlib.h>
#include <gsl/gsl_matrix.h>
typedef gsl_matrix* Math__GSL__Matrix__gsl_matrix ;
#include "const-c.inc"
MODULE = Test_gsl PACKAGE = Test_gsl
double
TOI (WF, size)
Math::GSL::Matrix::gsl_matrix WF
unsigned int size
PREINIT:
double tmp ;
CODE:
printf ("Size %d\n", size) ;
tmp = gsl_matrix_get (WF, 0, 0) ;
printf ("%g\n", tmp) ;
RETVAL = tmp ;
OUTPUT:
RETVAL
in typemap:
Math::GSL::Matrix::gsl_matrix T_PTROBJ
called by
Test_gsl::TOI ($Matr_gsl, $size_mat) ;
I got Segmentation fault
Thank for your help.
--
---
==========================================================================
Patrick DUPRÉ | |
Department of Chemistry | | Phone: (44)-(0)-1904-434384
The University of York | | Fax: (44)-(0)-1904-432516
Heslington | |
York YO10 5DD United Kingdom | | email: [email protected]
==========================================================================