diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-09-02 22:22:20 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-09-02 22:22:20 +0400 |
commit | c0789506e45ef76af5c591ee74240ad579302ad9 (patch) | |
tree | 5b0551cc667b4f3dc1905ee8f08f9904a8ba614b /xs/xsp/ExPolygon.xsp | |
parent | 17413019739a195360877f8a80b07a2ccd732a11 (diff) |
Return objects by reference instead of always cloning
Diffstat (limited to 'xs/xsp/ExPolygon.xsp')
-rw-r--r-- | xs/xsp/ExPolygon.xsp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xs/xsp/ExPolygon.xsp b/xs/xsp/ExPolygon.xsp index e4eabe943..f650e0e81 100644 --- a/xs/xsp/ExPolygon.xsp +++ b/xs/xsp/ExPolygon.xsp @@ -14,9 +14,9 @@ SV* pp() %code{% RETVAL = THIS->to_SV_pureperl(); %}; Polygon* contour() - %code{% const char* CLASS = "Slic3r::Polygon"; RETVAL = new Polygon(THIS->contour); %}; - Polygons holes() - %code{% RETVAL = THIS->holes; %}; + %code{% const char* CLASS = "Slic3r::Polygon::Ref"; RETVAL = &(THIS->contour); %}; + Polygons* holes() + %code{% RETVAL = &(THIS->holes); %}; void scale(double factor); void translate(double x, double y); double area(); |