Fixed some obvious mistakes and applied strict type checking to SurfaceCollections too

This commit is contained in:
Alessandro Ranellucci 2014-01-16 19:02:50 +01:00
parent a831f5b176
commit 3a3e53b59b
5 changed files with 20 additions and 7 deletions

View file

@ -24,6 +24,15 @@ Surface::is_bridge() const
}
#ifdef SLIC3RXS
void
Surface::from_SV_check(SV* surface_sv)
{
if (!sv_isa(surface_sv, "Slic3r::Surface") && !sv_isa(surface_sv, "Slic3r::Surface::Ref"))
CONFESS("Not a valid Slic3r::Surface object");
// a XS Surface was supplied
*this = *(Surface *)SvIV((SV*)SvRV( surface_sv ));
}
SV*
Surface::to_SV_ref() {
SV* sv = newSV(0);