-
Notifications
You must be signed in to change notification settings - Fork 0
/
swig.i
46 lines (40 loc) · 888 Bytes
/
swig.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%module swig_derive_test
#define PKG_NAME swig_derive_test
%include <std_vector.i>
%include <stdint.i>
%include <std_string.i>
%{
namespace ffi {
#include "bindings.h"
}
using namespace ffi;
namespace swig_derive_test {
// Wrapper for Rust class Test
class Test {
public:
ffi::Test *self;
Test(ffi::Test *ptr) {
self = ptr;
};
~Test(){
ffi::__SWIG_INJECT_free_Test(self);
self = NULL;
};
Test() { self = __SWIG_INJECT_default_Test(); };
};
Test different_test() {
return Test(ffi::__SWIG_INJECT_ffi_different_test());
}}
%}
namespace swig_derive_test {
// Wrapper for Rust class Test
class Test {
ffi::Test *self;
public:
~Test();
Test();
};
Test different_test();
}
%ignore __SWIG_INJECT_;
%include "bindings.h";