diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-07-18 21:09:07 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-07-18 21:09:07 +0400 |
commit | c030e389086017ae806161e0f516f3e19d83e084 (patch) | |
tree | 2a13b0581c33d3ce6df8ddd4a262b2d7ae8f025b /xs/xsp/SurfaceCollection.xsp | |
parent | 0efea9e4427fad4885cf2f3e339e39945fdda6a4 (diff) |
Ported ExtrusionPath::Collection
Diffstat (limited to 'xs/xsp/SurfaceCollection.xsp')
-rw-r--r-- | xs/xsp/SurfaceCollection.xsp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xs/xsp/SurfaceCollection.xsp b/xs/xsp/SurfaceCollection.xsp index 42f59815a..6cea6af1e 100644 --- a/xs/xsp/SurfaceCollection.xsp +++ b/xs/xsp/SurfaceCollection.xsp @@ -19,8 +19,8 @@ SurfaceCollection::new(...) RETVAL->surfaces.resize(items-1); for (unsigned int i = 1; i < items; i++) { // Note: a COPY of the input is stored - RETVAL->surfaces[i-1] = *(Surface *)SvIV((SV*)SvRV( ST(i) )); - RETVAL->surfaces[i-1].in_collection = true; + RETVAL->surfaces[i-1] = (Surface *)SvIV((SV*)SvRV( ST(i) )); + RETVAL->surfaces[i-1]->in_collection = true; } OUTPUT: RETVAL @@ -31,9 +31,9 @@ SurfaceCollection::arrayref() AV* av = newAV(); av_fill(av, THIS->surfaces.size()-1); int i = 0; - for (Surfaces::iterator it = THIS->surfaces.begin(); it != THIS->surfaces.end(); ++it) { + for (SurfacesPtr::iterator it = THIS->surfaces.begin(); it != THIS->surfaces.end(); ++it) { SV* sv = newSV(0); - sv_setref_pv( sv, "Slic3r::Surface", &*it ); + sv_setref_pv( sv, "Slic3r::Surface", *it ); av_store(av, i++, sv); } RETVAL = newRV_noinc((SV*)av); @@ -44,8 +44,8 @@ void SurfaceCollection::append(...) CODE: for (unsigned int i = 1; i < items; i++) { - THIS->surfaces.push_back(*(Surface *)SvIV((SV*)SvRV( ST(i) ))); - THIS->surfaces.back().in_collection = true; + THIS->surfaces.push_back((Surface *)SvIV((SV*)SvRV( ST(i) ))); + THIS->surfaces.back()->in_collection = true; } %} |