Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-04-21 03:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (389 votes), past polls