Rename _toPerl() to arrayref()

This commit is contained in:
Alessandro Ranellucci 2013-07-07 12:41:54 +02:00
parent b42333feed
commit d06ac3e31e
4 changed files with 5 additions and 5 deletions

View File

@ -9,10 +9,10 @@ XSLoader::load(__PACKAGE__, $VERSION);
package Slic3r::Point::XS; package Slic3r::Point::XS;
use overload use overload
'@{}' => sub { $_[0]->_toPerl }; '@{}' => sub { $_[0]->arrayref };
package Slic3r::ExPolygon::XS; package Slic3r::ExPolygon::XS;
use overload use overload
'@{}' => sub { $_[0]->_toPerl }; '@{}' => sub { $_[0]->arrayref };
1; 1;

View File

@ -18,7 +18,7 @@ class ExPolygon
public: public:
Polygon contour; Polygon contour;
Polygons holes; Polygons holes;
SV* _toPerl(); SV* arrayref();
}; };
Polygon* Polygon*

View File

@ -21,7 +21,7 @@ ExPolygon::new(...)
RETVAL RETVAL
SV* SV*
ExPolygon::_toPerl() ExPolygon::arrayref()
CODE: CODE:
const unsigned int num_holes = THIS->holes.size(); const unsigned int num_holes = THIS->holes.size();
AV* av = newAV(); AV* av = newAV();

View File

@ -10,7 +10,7 @@
%{ %{
SV* SV*
Point::_toPerl() Point::arrayref()
CODE: CODE:
RETVAL = point2perl(*THIS); RETVAL = point2perl(*THIS);
OUTPUT: OUTPUT: