Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Inline CPAN distribution.

Report information
The Basics
Id: 56652
Status: resolved
Priority: 0/
Queue: Inline

People
Owner: Nobody in particular
Requestors: sisyphus [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.46
Fixed in: (no value)



Subject: Bad callback example in Inline::C Cookbook
The Cookbook contains the following example: ########################### use Inline C; c_func_1('This is the first line'); c_func_2('This is the second line'); sub perl_sub_1 { print map "$_\n", @_; } __DATA__ __C__ void c_func_1(SV* text) { c_func_2(text); } void c_func_2(SV* text) { Inline_Stack_Vars; Inline_Stack_Push(newSVpvf("Plus an extra line")); Inline_Stack_Done; perl_call_pv("main::perl_sub_1", 0); Inline_Stack_Void; } ########################### For that to work, I have to repositon the c_func_1() XSub underneath the c_func_2() XSub - but that's not the problem. The script does then run as intended, but if we call c_func_1 and c_func_2 repeatedly in a for loop, then it all goes screwy. In a nutshell, the Inline Stack macros are not, by themselves, capable of performing callbacks correctly, and we should replace that example with an example based on the perlcall documentation. This should be fixed by the time 0.46_02 is released. Cheers, Rob
Fixed in 0.46_02, ticket closed with the release of 0.47 today.