Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re^3: XS from XS?

by ikegami (Pope)
on Apr 11, 2010 at 06:27 UTC ( #834058=note: print w/replies, xml ) Need Help??

in reply to Re^2: XS from XS?
in thread XS from XS?

If I understand that right--and I'm not certain I am--you are importing the Perl callable functions in one XS module, into the namespace of another XS module?

He's saving the address of functions callable from C in the current Perl package.

Replies are listed 'Best First'.
Re^4: XS from XS?
by creamygoodness (Curate) on Apr 11, 2010 at 15:31 UTC
    The PL_modglobal hash isn't quite the same thing as the general symbol table. From perlapi:
    PL_modglobal is a general purpose, interpreter global HV for use by extensions that need to keep information on a per-interpreter basis. In a pinch, it can also be used as a symbol table for extensions to share data among each other. It is a good idea to use keys prefixed by the package name of the extension that owns the data.

    However, storing the addresses in scalar package globals accessed from C via get_sv() would be another approach and might actually be better.

      Thankyou. That clarifies things a lot for me.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2021-01-22 13:02 GMT
Find Nodes?
    Voting Booth?