in reply to perlxs help

In C a parameter of
unsigned char c[MAX_LEN1][MAX_LEN2]
is mis-leading, because the first dimension of an array (MAX_LEN1) is ignored at the calling interface, only the second has any meaning. Having said that though, it appears that XS will not accept a multi-dimension array, so use something like this:
#define MAX_LEN2 1024 int function1(a,b,p) int a unsigned short b unsigned char *p CODE: unsigned char (*c)[MAX_LEN2] = (unsigned char (*)[MAX_LEN2])p; OUTPUT: RETVAL


Update: I notice that you have added a question 2. I can't answer that, but you should consider just what a "multi-dimensional array" is. Pedantically neither C nor Perl support that: C uses an array of pointers and Perl an array of references. To keep it simple you might consider breaking it down first into an array and then the type of each element (a pointer or a reference).

Replies are listed 'Best First'.
Re^2: perlxs help
by KVB (Novice) on Jan 17, 2011 at 11:18 UTC
    Thank you ver much:)