Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
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 making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-07-04 10:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls