pass 2d array to C function

Discussion in 'Perl Misc' started by min, Aug 28, 2004.

  1. min

    min Guest

    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!
     
    min, Aug 28, 2004
    #1
    1. Advertising

  2. min

    Anno Siegel Guest

    min <> wrote in comp.lang.perl.misc:
    > 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
     
    Anno Siegel, Aug 28, 2004
    #2
    1. Advertising

  3. min

    Guest

    (min) wrote:
    > 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

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Aug 29, 2004
    #3
  4. min

    min Guest

    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

    >
    > 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
     
    min, Aug 29, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jelle
    Replies:
    4
    Views:
    411
    jelle
    Apr 26, 2005
  2. Stefan Schukat
    Replies:
    1
    Views:
    360
    jelle
    Apr 29, 2005
  3. Replies:
    3
    Views:
    917
    Frederick Gotham
    Nov 30, 2006
  4. Belinda Lopez

    How to pass a Fix array to unknown size array

    Belinda Lopez, Mar 30, 2008, in forum: C Programming
    Replies:
    0
    Views:
    377
    Belinda Lopez
    Mar 30, 2008
  5. Davy
    Replies:
    9
    Views:
    1,472
Loading...

Share This Page