Just an idea: you probably want return "0"; instead of return '0';. A single char (as opposed to char*) is not the appropriate input for sv_setpv(), which is used behind the scenes to convert the return value of MyParser() into the SV that the Perl side wants.
With that change, I can run the example just fine (replacing your parser() routine with a simple printf(), that is — as I of course don't have your parser lib...). Otherwise (with the '0'), I do get a segfault when that code branch is executed.
If that doesn't fix it, it would help to know what the actual error is, not only where it occurs. Also, bonus points for a minimal self-contained snippet of code that we can actually run in order to reproduce the error :)
In reply to Re: some help with inline C
by almut
in thread some help with inline C
by downer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |