New XS framework for C and C++ code

This commit is contained in:
Alessandro Ranellucci 2013-06-22 17:16:45 +02:00
parent c88d8a5842
commit 9d27b5e4a7
18 changed files with 7889 additions and 0 deletions

14
xs/xsp/TriangleMesh.xsp Normal file
View file

@ -0,0 +1,14 @@
%module{Slic3r::TriangleMesh::XS};
%package{Slic3r::TriangleMesh::XS};
%{
PROTOTYPES: DISABLE
std::string
hello_world()
CODE:
RETVAL = "Hello world!";
OUTPUT:
RETVAL
%}

6
xs/xsp/XS.xsp Normal file
View file

@ -0,0 +1,6 @@
%module{Slic3r::XS};
%package{Slic3r::XS};
%{
#include <myinit.h>
%}

0
xs/xsp/mytype.map Normal file
View file

2
xs/xsp/typemap.xspt Normal file
View file

@ -0,0 +1,2 @@
%typemap{std::string}{simple};
%typemap{std::string&}{reference};