Point.xsp 426 B

12345678910111213141516171819202122232425262728293031323334
  1. %module{Slic3r::XS};
  2. %{
  3. #include <myinit.h>
  4. #include "Point.hpp"
  5. %}
  6. %name{Slic3r::Point::XS} class Point {
  7. Point(unsigned long _x = 0, unsigned long _y = 0);
  8. ~Point();
  9. %{
  10. SV*
  11. Point::arrayref()
  12. CODE:
  13. RETVAL = point2perl(*THIS);
  14. OUTPUT:
  15. RETVAL
  16. %}
  17. };
  18. %package{Slic3r::Point::XS};
  19. %{
  20. PROTOTYPES: DISABLE
  21. std::string
  22. hello_world()
  23. CODE:
  24. RETVAL = "Hello world!";
  25. OUTPUT:
  26. RETVAL
  27. %}