Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

syphilis's scratchpad

by syphilis (Canon)
on Dec 03, 2006 at 10:20 UTC ( #587490=scratchpad: print w/ replies, xml ) Need Help??

use warnings; use Inline C => Config => BUILD_NOISY => 1, USING => 'ParseRegExp', PRE_HEAD => "#define PERL_NO_GET_CONTEXT\n", ; use Inline C => <<'EOC'; /* Won't compile with PERL_NO_GET_CONTEXT SV * foo(SV * x) { return newSVnv(SvNV(x) / 1.4); } */ /* Also won't compile with PERL_NO_GET_CONTEXT void baz(SV * x) { printf("%e\n", SvNV(x)); } */ double bar(double x) { return x / 1.4; } EOC print bar(3.9), "\n"; __END__ The double typemap: NV T_NV INPUT T_NV $var = ($type)SvNV($arg) OUTPUT T_NV sv_setnv($arg, (NV)$var);
Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2015-05-06 09:18 GMT
Find Nodes?
    Voting Booth?

    In my home, the TV remote control is ...

    Results (131 votes), past polls