Vladimir Jebelev wrote:
> 
> This script below successfully compiles and then segfaults in runtime on
> my Linux system (Perl 5.6, gcc version pgcc-2.91.66, Inline 0.30), I am
> stumped:

Vladimir,

It's a symbol clash with perl. Change yyparse to my_yyparse and it
works. I wanted to make Inline warn about this situation, but decided to
defer it to a later release. I documented it instead. Use the following
command to get a list of symbols to avoid:

    nm /usr/bin/perl

You can also use the 'PREFIX="my_"' option to bind the function to
yyparse in Perl.

Brian

PS Neil Watkiss (Inline::Python) is looking into doing this yacc stuff
as well. I'm sure he'll get back to you soon with some ideas. He works
fast :)

> 
> #!/usr/bin/perl
> 
> use Inline C => 'DATA';
> 
> print "res: ", parse_it(), "\n";
> 
> __END__
> 
> __C__
> 
> int yyparse() {
>     return 0;
> }
> 
> int parse_it() {
> 
>     yyparse();
>     return 0;
> }
> 

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

Reply via email to