Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-08-30 15:57:13 +0300
committerbubnikv <bubnikv@gmail.com>2017-08-30 15:57:13 +0300
commit247070cd8260d174162bb0cf21ead7d69af77f53 (patch)
treeaf40aab4119cd5beda28446a0f357f953690b9b6 /xs
parentdcbc28fd499c695c6d29ee7a0df3cd3355462715 (diff)
Fixed a regression bug of Slic3r::encode() / decode()
Diffstat (limited to 'xs')
-rw-r--r--xs/CMakeLists.txt9
-rw-r--r--xs/xsp/Config.xsp2
-rw-r--r--xs/xsp/XS.xsp9
3 files changed, 12 insertions, 8 deletions
diff --git a/xs/CMakeLists.txt b/xs/CMakeLists.txt
index fd23d2fb7..9d7c31100 100644
--- a/xs/CMakeLists.txt
+++ b/xs/CMakeLists.txt
@@ -392,10 +392,11 @@ find_package(PerlEmbed REQUIRED)
target_include_directories(XS PRIVATE ${PERL_INCLUDE_PATH})
target_compile_options(XS PRIVATE ${PerlEmbed_CCFLAGS})
# 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)
-# set(CMAKE_CXX_FLAGS_RELEASE /Od)
-# set(CMAKE_C_FLAGS_RELEASE /Od)
-#endif()
+if (WIN32 AND ";${PerlEmbed_CCFLAGS};" MATCHES ";[-/]Od;")
+ message(STATUS "Perl compiled without optimization. Disabling optimization for the Slic3r build.")
+ set(CMAKE_CXX_FLAGS_RELEASE /Od /Zi)
+ set(CMAKE_C_FLAGS_RELEASE /Od /Zi)
+endif()
# The following line will add -fPIC on Linux to make the XS.so rellocable.
add_definitions(${PerlEmbed_CCCDLFLAGS})
if (WIN32)
diff --git a/xs/xsp/Config.xsp b/xs/xsp/Config.xsp
index ea84d77c5..368746de4 100644
--- a/xs/xsp/Config.xsp
+++ b/xs/xsp/Config.xsp
@@ -44,7 +44,7 @@
try {
THIS->load_from_gcode(input_file);
} 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);
diff --git a/xs/xsp/XS.xsp b/xs/xsp/XS.xsp
index 6ba6817c1..5fa3a4b7d 100644
--- a/xs/xsp/XS.xsp
+++ b/xs/xsp/XS.xsp
@@ -52,19 +52,22 @@ std::string
encode_path(src)
const char *src;
CODE:
- Slic3r::encode_path(src);
+ RETVAL = Slic3r::encode_path(src);
+ OUTPUT: RETVAL
std::string
decode_path(src)
const char *src;
CODE:
- Slic3r::decode_path(src);
+ RETVAL = Slic3r::decode_path(src);
+ OUTPUT: RETVAL
std::string
normalize_utf8_nfc(src)
const char *src;
CODE:
- Slic3r::normalize_utf8_nfc(src);
+ RETVAL = Slic3r::normalize_utf8_nfc(src);
+ OUTPUT: RETVAL
void
xspp_test_croak_hangs_on_strawberry()