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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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?

If so, that's not quite what I'm after--though I understand that my question was unclear.

My thought--albeit perhaps not fully thought through--is to have an XS module that is callable/usable from Perl in the normal way. But to also allow other XS modules to make use of the internal C functions (that sit behind the Perl-callable XS interface), directly at runtime. That is, without #includeing the sources, or linking against the objects or a lib. There would be two or three entrypoints to import at most.

The notion was to remove the compile-time dependancy upon the headers or a lib for potential XS users of the module. They could then decide at runtime whether it is available and use it. Or fallback to other mechanisms. Ie. If the module is installed locally, load it and "obtain the required entrypoints".

Hm. I know I can do this on Windows. LoadModule()/GetProcAddr() are all I need. But I would need a portable solution, and I don't know enough about other platforms to know if there are equivalents.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re^2: XS from XS? by BrowserUk
in thread XS from XS? by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-18 02:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found