Fixed a regression bug of Slic3r::encode() / decode()

This commit is contained in:
bubnikv 2017-08-30 14:57:13 +02:00
parent dcbc28fd49
commit 247070cd82
3 changed files with 12 additions and 8 deletions

View File

@ -392,10 +392,11 @@ find_package(PerlEmbed REQUIRED)
target_include_directories(XS PRIVATE ${PERL_INCLUDE_PATH}) target_include_directories(XS PRIVATE ${PERL_INCLUDE_PATH})
target_compile_options(XS PRIVATE ${PerlEmbed_CCFLAGS}) target_compile_options(XS PRIVATE ${PerlEmbed_CCFLAGS})
# If the Perl is compiled with optimization off, disable optimization over the whole project. # If the Perl is compiled with optimization off, disable optimization over the whole project.
#if ("-Od" IN_LIST PerlEmbed_CCFLAGS OR "/Od" IN_LIST PerlEmbed_CCFLAGS) if (WIN32 AND ";${PerlEmbed_CCFLAGS};" MATCHES ";[-/]Od;")
# set(CMAKE_CXX_FLAGS_RELEASE /Od) message(STATUS "Perl compiled without optimization. Disabling optimization for the Slic3r build.")
# set(CMAKE_C_FLAGS_RELEASE /Od) set(CMAKE_CXX_FLAGS_RELEASE /Od /Zi)
#endif() set(CMAKE_C_FLAGS_RELEASE /Od /Zi)
endif()
# The following line will add -fPIC on Linux to make the XS.so rellocable. # The following line will add -fPIC on Linux to make the XS.so rellocable.
add_definitions(${PerlEmbed_CCCDLFLAGS}) add_definitions(${PerlEmbed_CCCDLFLAGS})
if (WIN32) if (WIN32)

View File

@ -44,7 +44,7 @@
try { try {
THIS->load_from_gcode(input_file); THIS->load_from_gcode(input_file);
} catch (std::exception& e) { } catch (std::exception& e) {
croak("Error exracting configuration from a g-code %s:\n%s\n", input_file.c_str(), e.what()); croak("Error extracting configuration from a g-code %s:\n%s\n", input_file.c_str(), e.what());
} }
%}; %};
%name{_save} void save(std::string file); %name{_save} void save(std::string file);

View File

@ -52,19 +52,22 @@ std::string
encode_path(src) encode_path(src)
const char *src; const char *src;
CODE: CODE:
Slic3r::encode_path(src); RETVAL = Slic3r::encode_path(src);
OUTPUT: RETVAL
std::string std::string
decode_path(src) decode_path(src)
const char *src; const char *src;
CODE: CODE:
Slic3r::decode_path(src); RETVAL = Slic3r::decode_path(src);
OUTPUT: RETVAL
std::string std::string
normalize_utf8_nfc(src) normalize_utf8_nfc(src)
const char *src; const char *src;
CODE: CODE:
Slic3r::normalize_utf8_nfc(src); RETVAL = Slic3r::normalize_utf8_nfc(src);
OUTPUT: RETVAL
void void
xspp_test_croak_hangs_on_strawberry() xspp_test_croak_hangs_on_strawberry()