mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 00:52:51 +00:00
Bless arrayref representation into Slic3r classes
This commit is contained in:
@@ -46,7 +46,7 @@ polygon2perl(Polygon& poly) {
|
||||
for (unsigned int i = 0; i < num_points; i++) {
|
||||
av_store(av, i, point2perl(poly[i]));
|
||||
}
|
||||
return (SV*)newRV_noinc((SV*)av);
|
||||
return sv_bless(newRV_noinc((SV*)av), gv_stashpv("Slic3r::Polygon", GV_ADD));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,7 +21,7 @@ point2perl(Point& point) {
|
||||
AV* av = newAV();
|
||||
av_fill(av, 1);
|
||||
av_store_point_xy(av, point.x, point.y);
|
||||
return (SV*)newRV_noinc((SV*)av);
|
||||
return sv_bless(newRV_noinc((SV*)av), gv_stashpv("Slic3r::Point", GV_ADD));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user