Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Calling perl builtins from C

by chromatic (Archbishop)
on Aug 04, 2003 at 20:30 UTC ( [id://280792]=note: print w/replies, xml ) Need Help??


in reply to Calling perl builtins from C

localtime isn't implemented in Perl as a function. It's actually a pp code. As of Perl 5.8.0, see pp_sys.c. That actually won't help you, either, because it takes and returns internal Perl data structures.

All of this is mostly academic, though, because there's already a C localtime call, if you really need it.

I'm not good at XS, but I'd break my code into smaller chunks and do as little in C as possible; if you find yourself needing to call internal Perl pp codes, you could probably refactor your code down more sooner than you could figure out how to fake up what the pp code actually needs. (See again my disclaimer about not being good at XS, though.)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://280792]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-26 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found