in reply to How to pass a function reference from C to perl

You can't do that. Perl has different calling conventions to C. You can only call a C function from within C-space. So you'll have to have some sort of XS function that calls your init function.

See the XS Cookbook which may have an example of storing and calling a function pointer.

  • Comment on Re: How to pass a function reference from C to perl

Replies are listed 'Best First'.
Re: Re: How to pass a function reference from C to perl
by Anonymous Monk on May 22, 2002 at 11:03 UTC
    This in fact what I am trying to do (write an XS function).. but no success so far