Return ExtrusionPath->polyline and ExtrusionLoop->polygon by reference

This commit is contained in:
Alessandro Ranellucci 2013-08-31 00:50:03 +02:00
parent d2e4bba074
commit dd70f6be2f
6 changed files with 26 additions and 10 deletions

View file

@ -39,12 +39,12 @@ _new(CLASS, polygon_sv, role, height, flow_spacing)
Polygon*
ExtrusionLoop::polygon(...)
PREINIT:
const char* CLASS = "Slic3r::Polygon";
const char* CLASS = "Slic3r::Polygon::Ref";
CODE:
if (items > 1) {
THIS->polygon.from_SV_check( ST(1) );
}
RETVAL = new Polygon(THIS->polygon);
RETVAL = &(THIS->polygon);
OUTPUT:
RETVAL

View file

@ -41,12 +41,12 @@ _new(CLASS, polyline_sv, role, height, flow_spacing)
Polyline*
ExtrusionPath::polyline(...)
PREINIT:
const char* CLASS = "Slic3r::Polyline";
const char* CLASS = "Slic3r::Polyline::Ref";
CODE:
if (items > 1) {
THIS->polyline.from_SV_check( ST(1) );
}
RETVAL = new Polyline(THIS->polyline);
RETVAL = &(THIS->polyline);
OUTPUT:
RETVAL