Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/Point.hpp')
-rw-r--r--xs/src/Point.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/xs/src/Point.hpp b/xs/src/Point.hpp
index eedd73fde..b468e37e2 100644
--- a/xs/src/Point.hpp
+++ b/xs/src/Point.hpp
@@ -14,8 +14,14 @@ class Point
unsigned long x;
unsigned long y;
Point(unsigned long _x = 0, unsigned long _y = 0): x(_x), y(_y) {};
- ~Point();
- SV* _toPerl();
};
+SV*
+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);
+}
+
#endif