Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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 lurking in the Monastery: (8)
As of 2015-06-30 10:20 GMT
Find Nodes?
    Voting Booth?

    What kind of chocolate gives you the most pleasure?

    Results (782 votes), past polls