1385018724
Removed the Perl dependencies on Encode, Encode::Locale and Unicode::Normalize. Added dependency on boost::locale. Added encode_path, decode_path, normalize_utf8 functions to Slic3r.xs Slic3r.xs has been made mostly utf8 safe by using the boost::nowide library, thanks to @alexrj for the idea. Simplified the encode_path / decode_path stuff: wxWidgets are unicode already, so there is no need to decode_path() from it. Perl / win32 interfacing is non-unicode, so decode_path() is executed on ARGV just at the beginning of the perl scripts.
77 lines
1.2 KiB
Plaintext
77 lines
1.2 KiB
Plaintext
%module{Slic3r::XS};
|
|
%package{Slic3r::XS};
|
|
|
|
#include <xsinit.h>
|
|
#include "Utils.hpp"
|
|
|
|
%{
|
|
|
|
%}
|
|
|
|
%package{Slic3r};
|
|
%{
|
|
|
|
SV*
|
|
VERSION()
|
|
CODE:
|
|
RETVAL = newSVpv(SLIC3R_VERSION, 0);
|
|
OUTPUT: RETVAL
|
|
|
|
SV*
|
|
BUILD()
|
|
CODE:
|
|
RETVAL = newSVpv(SLIC3R_BUILD, 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
|
|
set_logging_level(level)
|
|
unsigned int level;
|
|
CODE:
|
|
Slic3r::set_logging_level(level);
|
|
|
|
void
|
|
trace(level, message)
|
|
unsigned int level;
|
|
char *message;
|
|
CODE:
|
|
Slic3r::trace(level, message);
|
|
|
|
std::string
|
|
encode_path(src)
|
|
const char *src;
|
|
CODE:
|
|
Slic3r::encode_path(src);
|
|
|
|
std::string
|
|
decode_path(src)
|
|
const char *src;
|
|
CODE:
|
|
Slic3r::decode_path(src);
|
|
|
|
std::string
|
|
normalize_utf8_nfc(src)
|
|
const char *src;
|
|
CODE:
|
|
Slic3r::normalize_utf8_nfc(src);
|
|
|
|
void
|
|
xspp_test_croak_hangs_on_strawberry()
|
|
CODE:
|
|
try {
|
|
throw 1;
|
|
} catch (...) {
|
|
croak("xspp_test_croak_hangs_on_strawberry: exception catched\n");
|
|
}
|
|
%} |