in reply to Re^4: Inline CPP
in thread Inline CPP
I also seem to recall that there can be problems when one Inline function tries to access an Inline'd function in a module - but I'm not sure of the details. It's not all that difficult to remove the Inline dependency from a module (thereby making it the same as any other XS module). <plug>InlineX::C2XS and InlineX::CPP2XS can help with that </plug>.use warnings; use Inline C => Config => BUILD_NOISY => 1; use Inline C => <<'EOC'; void add_nir(int x, int y, SV * ref_int) { sv_setiv(ref_int, x + y); } EOC my $test; add_nir(1, 4, $test); print $test, "\n"; # prints "5"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Inline CPP
by nirf1 (Novice) on Jun 02, 2008 at 13:04 UTC | |
by syphilis (Archbishop) on Jun 03, 2008 at 02:29 UTC | |
by nirf1 (Novice) on Jun 03, 2008 at 07:32 UTC | |
by syphilis (Archbishop) on Jun 04, 2008 at 03:08 UTC |