More refactoring on Config XS bindings

This commit is contained in:
Alessandro Ranellucci 2015-12-16 12:58:06 +01:00
parent 3c862836f2
commit 934bd43e35
7 changed files with 56 additions and 41 deletions

View file

@ -95,7 +95,6 @@ SV*
print_config_def()
CODE:
t_optiondef_map &def = Slic3r::print_config_def.options;
FullPrintConfig config;
HV* options_hv = newHV();
for (t_optiondef_map::iterator oit = def.begin(); oit != def.end(); ++oit) {
@ -179,7 +178,8 @@ print_config_def()
(void)hv_stores( hv, "labels", newRV_noinc((SV*)av) );
}
(void)hv_stores( hv, "default", ConfigBase__get(&config, opt_key) );
if (optdef->default_value != NULL)
(void)hv_stores( hv, "default", ConfigOption_to_SV(*optdef->default_value, *optdef) );
(void)hv_store( options_hv, opt_key.c_str(), opt_key.length(), newRV_noinc((SV*)hv), 0 );
}