PrusaSlicer-NonPlainar/xs/xsp/XS.xsp
bubnikv aac968162b Unit test to verify whether Slic3r would hang when croaking from
a C++ exception handler. This is an unfortunate error in some
Strawberry Perl distributions.
2016-11-06 17:42:36 +01:00

39 lines
576 B
Plaintext

%module{Slic3r::XS};
%package{Slic3r::XS};
#include <xsinit.h>
%{
%}
%package{Slic3r};
%{
SV*
VERSION()
CODE:
RETVAL = newSVpv(SLIC3R_VERSION, 0);
OUTPUT: RETVAL
SV*
DEBUG_OUT_PATH_PREFIX()
CODE:
RETVAL = newSVpv(SLIC3R_DEBUG_OUT_PATH_PREFIX, 0);
OUTPUT: RETVAL
SV*
FORK_NAME()
CODE:
RETVAL = newSVpv(SLIC3R_FORK_NAME, 0);
OUTPUT: RETVAL
void
xspp_test_croak_hangs_on_strawberry()
CODE:
try {
throw 1;
} catch (...) {
croak("xspp_test_croak_hangs_on_strawberry: exception catched\n");
}
%}