Merge branch 'xs-config'

Conflicts:
	lib/Slic3r/Config.pm
	xs/MANIFEST
This commit is contained in:
Alessandro Ranellucci
2013-12-22 01:41:55 +01:00
19 changed files with 2370 additions and 1235 deletions

View File

@@ -174,6 +174,23 @@ Point::from_SV_check(SV* point_sv)
this->from_SV(point_sv);
}
}
SV*
Pointf::to_SV_pureperl() const {
AV* av = newAV();
av_fill(av, 1);
av_store(av, 0, newSVnv(this->x));
av_store(av, 1, newSVnv(this->y));
return newRV_noinc((SV*)av);
}
void
Pointf::from_SV(SV* point_sv)
{
AV* point_av = (AV*)SvRV(point_sv);
this->x = SvNV(*av_fetch(point_av, 0, 0));
this->y = SvNV(*av_fetch(point_av, 1, 0));
}
#endif
}