mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-30 21:42:02 -06:00
Replace to_SV_ref() and to_SV_clone_ref() with templated glue functions
This commit is contained in:
parent
f76e2c2222
commit
76a8ec3d9e
54 changed files with 39 additions and 254 deletions
|
@ -2,9 +2,6 @@
|
|||
#include "ClipperUtils.hpp"
|
||||
#include "Polygon.hpp"
|
||||
#include "Polyline.hpp"
|
||||
#ifdef SLIC3RXS
|
||||
#include "perlglue.hpp"
|
||||
#endif
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -195,23 +192,8 @@ Polygon::triangulate_convex(Polygons* polygons) const
|
|||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
|
||||
REGISTER_CLASS(Polygon, "Polygon");
|
||||
|
||||
SV*
|
||||
Polygon::to_SV_ref() {
|
||||
SV* sv = newSV(0);
|
||||
sv_setref_pv( sv, perl_class_name_ref(this), (void*)this );
|
||||
return sv;
|
||||
}
|
||||
|
||||
SV*
|
||||
Polygon::to_SV_clone_ref() const {
|
||||
SV* sv = newSV(0);
|
||||
sv_setref_pv( sv, perl_class_name(this), new Polygon(*this) );
|
||||
return sv;
|
||||
}
|
||||
|
||||
void
|
||||
Polygon::from_SV_check(SV* poly_sv)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue