Conditional compilation to exclude all Perl/XS stuff from C++ code

This commit is contained in:
Alessandro Ranellucci 2013-09-13 14:48:40 +02:00
parent e2cb40766b
commit 6e22a82e7d
20 changed files with 133 additions and 87 deletions

View file

@ -11,20 +11,6 @@ Polygon::last_point() const
return new Point(this->points.front()); // last point == first point for polygons
}
SV*
Polygon::to_SV_ref() {
SV* sv = newSV(0);
sv_setref_pv( sv, "Slic3r::Polygon::Ref", (void*)this );
return sv;
}
SV*
Polygon::to_SV_clone_ref() const {
SV* sv = newSV(0);
sv_setref_pv( sv, "Slic3r::Polygon", new Polygon(*this) );
return sv;
}
Lines
Polygon::lines() const
{
@ -117,4 +103,20 @@ Polygon::is_valid() const
return this->points.size() >= 3;
}
#ifdef SLIC3RXS
SV*
Polygon::to_SV_ref() {
SV* sv = newSV(0);
sv_setref_pv( sv, "Slic3r::Polygon::Ref", (void*)this );
return sv;
}
SV*
Polygon::to_SV_clone_ref() const {
SV* sv = newSV(0);
sv_setref_pv( sv, "Slic3r::Polygon", new Polygon(*this) );
return sv;
}
#endif
}