Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

by BrowserUk (Patriarch)
on Jul 08, 2014 at 12:00 UTC ( [id://1092712]=note: print w/replies, xml ) Need Help??


in reply to Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

You may find the thread at Perl crash during perl_clone contains a lot of relevant information.

Be warned. It is a long and deep thread with much of the best information coming towards the end; down around Re^24: Perl crash during perl_clone.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.
  • Comment on Re: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?

Replies are listed 'Best First'.
Re^2: Perl calls C calls Perl CallBack: How Perl callback use the same interpreter/context as Perl caller?
by itamarat (Acolyte) on Jul 08, 2014 at 13:34 UTC

    Hi,

    Thanks for your reply!

    I've tried to use Perl_get_context() (or dTHX) and got NULL.

    Currently, I don't understand how to get the pointer of the interpreter of the Perl function that calls the C function.

    My system structure:
    Perl function --> C DLL --> Perl Callback

    The requirement is that the Perl function and the Perl callback will work from the same context.


    Many thanks and best regards,

    Itamar

      May your C DLL be loading and using Perl.DLL to resolve symbols instead of linking back to the perl executable?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-25 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found