pass 2d array to C function

M

min

I need to call a C function from perl. How do I pass a 2D array into
the C function that I am invoking from perl? Can anyone direct me to
a tutorial?

Thanks!
 
A

Anno Siegel

min said:
I need to call a C function from perl. How do I pass a 2D array into
the C function that I am invoking from perl? Can anyone direct me to
a tutorial?

These are the basics, the last one is a tutorial:

perlxs
perlapi
perlguts
perlXStut

If you intend to use Inline, there are particularly helpful ones. You
*may* get away with these with little reference to the above.

Inline # as far as needed (not much)
Inline::C # as far as needed (a lot)
Inline::C-Cookbook # start here

Anno
 
C

ctcgag

I need to call a C function from perl. How do I pass a 2D array into
the C function that I am invoking from perl? Can anyone direct me to
a tutorial?

It depends. Are you writing the C function, or merely using one that
already exists? If the later, what kind of 2D array does the C function
expect to receive?

Xho
 
M

min

I am using one that already exists. The C function requires a void
**. The array that will be passed in is of different datatypes
(double, string, etc).

Min
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top