http://qs321.pair.com?node_id=853410


in reply to Re: Interfacing Perl with C++, using XS, with external files, and using the STL as parameters and return values.
in thread Interfacing Perl with C++, using XS, with external files, and using the STL as parameters and return values.

Wow. I love Devel::Size, I've used that module to test production code many times. Thank you so much for such a useful module. I'm pretty sure my approach is incompatible with exceptions, as I do all my work in the typemap, and I use the XS to directly map to my target function. What I "should" be doing is creating an insulating class, that can catch the exception at the XS layer, and then rethrowing the perl exception from there. This is basically what you are doing in your code. I still think this is unfortunate. You'd think there would be some handy macro that would handle this sort of thing for you.
  • Comment on Re^2: Interfacing Perl with C++, using XS, with external files, and using the STL as parameters and return values.

Replies are listed 'Best First'.
Re^3: Interfacing Perl with C++, using XS, with external files, and using the STL as parameters and return values.
by BrowserUk (Patriarch) on Aug 06, 2010 at 13:58 UTC
    Wow. I love Devel::Size, I've used that module to test production code many times. Thank you so much for such a useful module.

    The qudos for Devel::Size firmly belongs to the original author, Dan Sugalski. I just tweaked it a bit to make it a little faster, more reliable and use less memory.