diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-06-22 13:30:15 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-06-22 13:30:15 +0300 |
commit | f8982c0ca181440c23bae480de8f2e297042c3b6 (patch) | |
tree | f39d59dba7b75a08767d83d83dc24385307651f8 /xs/xsp | |
parent | e89083090f3f0e89500935e054e2774f791cbe44 (diff) | |
parent | 8abe1b3633b9fe6f304eeac2feb7aeeeae0bf8e8 (diff) |
Merge branch 'machine-limits-config' of https://github.com/prusa3d/Slic3r into time_estimate
Diffstat (limited to 'xs/xsp')
-rw-r--r-- | xs/xsp/Config.xsp | 6 | ||||
-rw-r--r-- | xs/xsp/Print.xsp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xs/xsp/Config.xsp b/xs/xsp/Config.xsp index 6adfc49a2..b8ad84ba4 100644 --- a/xs/xsp/Config.xsp +++ b/xs/xsp/Config.xsp @@ -74,13 +74,13 @@ static StaticPrintConfig* new_GCodeConfig() %code{% RETVAL = new GCodeConfig(); %}; static StaticPrintConfig* new_PrintConfig() - %code{% RETVAL = new PrintConfig(); %}; + %code{% RETVAL = static_cast<GCodeConfig*>(new PrintConfig()); %}; static StaticPrintConfig* new_PrintObjectConfig() %code{% RETVAL = new PrintObjectConfig(); %}; static StaticPrintConfig* new_PrintRegionConfig() %code{% RETVAL = new PrintRegionConfig(); %}; static StaticPrintConfig* new_FullPrintConfig() - %code{% RETVAL = static_cast<PrintObjectConfig*>(new FullPrintConfig()); %}; + %code{% RETVAL = static_cast<GCodeConfig*>(new FullPrintConfig()); %}; ~StaticPrintConfig(); bool has(t_config_option_key opt_key); SV* as_hash() @@ -119,7 +119,7 @@ auto config = new FullPrintConfig(); try { config->load(path); - RETVAL = static_cast<PrintObjectConfig*>(config); + RETVAL = static_cast<GCodeConfig*>(config); } catch (std::exception& e) { delete config; croak("Error extracting configuration from %s:\n%s\n", path, e.what()); diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp index 80b881c7b..bc5eb7433 100644 --- a/xs/xsp/Print.xsp +++ b/xs/xsp/Print.xsp @@ -133,7 +133,7 @@ _constant() ~Print(); Ref<StaticPrintConfig> config() - %code%{ RETVAL = &THIS->config; %}; + %code%{ RETVAL = static_cast<GCodeConfig*>(&THIS->config); %}; Ref<StaticPrintConfig> default_object_config() %code%{ RETVAL = &THIS->default_object_config; %}; Ref<StaticPrintConfig> default_region_config() |