Garrett Goebel wrote:
> 
> Jens,
> 
> You're in a bad state when I can figure your problem out ;-)
> 
> From: Jens Luedicke [mailto:[EMAIL PROTECTED]]
> >
> >
> > hello_world("Hi there ...\n", $#ARGV, @ARGV);
>   ^^^^^^^^^^^
> >
> >
> > int gtk_hello_world(char *msg, int argc, char *argv[])
>       ^^^^^^^^^^^^^^^

Hold on Garrett, Jens used the PREFIX option which pulls off the gtk_
before binding to Perl. In a perfect world, this code should have
worked.

But Inline is 'beta' software. Jens has actually stumbled across a
deficiency in Inline's parse grammar.

Inline only matches types of the regex form /\**\w+/ (a word preceded by
one or more stars). It then try to match a prospective type against the
master list provided through 'typemap' files. (The default is
'/usr/lib/perl5/5.6.1/ExtUtils/typemap')

Inline cannot yet parse types of the form '*argv[]'. It could match
'**argv' which is similar, and there *is* actually a typemap listing for
it. Try it, but I suspect you may need a little work to get it to
operate.

FYI, the command:

    perl -MInline=info sample.pl

would have informed you that this function did not bind. Future versions
of Inline will warn you when functions don't bind. Your hello_world
function compiled fine, but
Inline silently ignored it. Until run time...

Cheers, Brian

-- 
perl -le 'use Inline C=>q{SV*JAxH(char*x){return newSVpvf
("Just Another %s Hacker",x);}};print JAxH+Perl'

Reply via email to