Return objects by reference instead of always cloning

This commit is contained in:
Alessandro Ranellucci 2013-09-02 20:22:20 +02:00
parent 1741301973
commit c0789506e4
30 changed files with 158 additions and 54 deletions

View file

@ -339,9 +339,9 @@ polynode2perl(const ClipperLib::PolyNode& node)
Slic3r::Polygon p;
ClipperPolygon_to_Slic3rPolygon(node.Contour, p);
if (node.IsHole()) {
(void)hv_stores( hv, "hole", p.to_SV() );
(void)hv_stores( hv, "hole", p.to_SV_clone_ref() );
} else {
(void)hv_stores( hv, "outer", p.to_SV() );
(void)hv_stores( hv, "outer", p.to_SV_clone_ref() );
}
(void)hv_stores( hv, "children", polynode_children_2_perl(node) );
return (SV*)newRV_noinc((SV*)hv);