Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: XS DESTROY not invoked

by bulk88 (Priest)
on Sep 24, 2012 at 15:57 UTC ( #995418=note: print w/replies, xml ) Need Help??

in reply to XS DESTROY not invoked

If your are using C++ ignore half of what I said below.
MODULE = OpenCA::OpenSSL PACKAGE = OpenCA::OpenSSL::CRL OpenCA_OpenSSL_CRL _new_from_der(SV * sv)
That is not valid XS code (maybe it now is in 2012), the types (SV *) go on the next inline in an explicity or implicity INPUT: section. Also _new_from_der will be called OpenCA::OpenSSL::CRL::_new_from_der in Perl. You also didn't show the body of _new_from_der so who knows if that works.
MODULE = OpenCA::OpenSSL PACKAGE = OpenCA::OpenSSL::CRL +Ptr PREFIX = some_
2 different packages. Do a
use Data::Dumper; use OpenCA::YourModule; print Dumper(\%OpenCA::OpenSSL::CRL::);
to see what subs actually were registered in what packages. You can also look at end of the .c file generated during the compiling process for the "XS_EXTERNAL(boot_RootName__SecondName)" function and look at the newXS()s yourself. Also get very familiar with a step through C debugger and having your C compiler generate debugging symbols. You also will probably want to compile an -Od DEBUGGING perl for yourself too.

edit:code sample fixed

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995418]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2017-06-27 23:50 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (617 votes). Check out past polls.