compile with swig files if available
This commit is contained in:
@@ -11,22 +11,22 @@
|
||||
typedef struct {
|
||||
%extend {
|
||||
pm3() {
|
||||
printf("SWIG pm3 constructor, get current pm3\n");
|
||||
// printf("SWIG pm3 constructor, get current pm3\n");
|
||||
pm3_device * p = pm3_get_current_dev();
|
||||
p->script_embedded = 1;
|
||||
return p;
|
||||
}
|
||||
pm3(char *port) {
|
||||
printf("SWIG pm3 constructor with port, open pm3\n");
|
||||
// printf("SWIG pm3 constructor with port, open pm3\n");
|
||||
pm3_device * p = pm3_open(port);
|
||||
p->script_embedded = 0;
|
||||
return p;
|
||||
}
|
||||
~pm3() {
|
||||
if ($self->script_embedded) {
|
||||
printf("SWIG pm3 destructor, nothing to do\n");
|
||||
// printf("SWIG pm3 destructor, nothing to do\n");
|
||||
} else {
|
||||
printf("SWIG pm3 destructor, close pm3\n");
|
||||
// printf("SWIG pm3 destructor, close pm3\n");
|
||||
pm3_close($self);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2687,7 +2687,7 @@ static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
|
||||
#include "comms.h"
|
||||
|
||||
SWIGINTERN pm3 *new_pm3__SWIG_0(void){
|
||||
printf("SWIG pm3 constructor, get current pm3\n");
|
||||
// printf("SWIG pm3 constructor, get current pm3\n");
|
||||
pm3_device * p = pm3_get_current_dev();
|
||||
p->script_embedded = 1;
|
||||
return p;
|
||||
@@ -2701,16 +2701,16 @@ SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
|
||||
}
|
||||
|
||||
SWIGINTERN pm3 *new_pm3__SWIG_1(char *port){
|
||||
printf("SWIG pm3 constructor with port, open pm3\n");
|
||||
// printf("SWIG pm3 constructor with port, open pm3\n");
|
||||
pm3_device * p = pm3_open(port);
|
||||
p->script_embedded = 0;
|
||||
return p;
|
||||
}
|
||||
SWIGINTERN void delete_pm3(pm3 *self){
|
||||
if (self->script_embedded) {
|
||||
printf("SWIG pm3 destructor, nothing to do\n");
|
||||
// printf("SWIG pm3 destructor, nothing to do\n");
|
||||
} else {
|
||||
printf("SWIG pm3 destructor, close pm3\n");
|
||||
// printf("SWIG pm3 destructor, close pm3\n");
|
||||
pm3_close(self);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2672,7 +2672,7 @@ static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
|
||||
#include "comms.h"
|
||||
|
||||
SWIGINTERN pm3 *new_pm3__SWIG_0(void){
|
||||
printf("SWIG pm3 constructor, get current pm3\n");
|
||||
// printf("SWIG pm3 constructor, get current pm3\n");
|
||||
pm3_device * p = pm3_get_current_dev();
|
||||
p->script_embedded = 1;
|
||||
return p;
|
||||
@@ -2801,16 +2801,16 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
|
||||
|
||||
|
||||
SWIGINTERN pm3 *new_pm3__SWIG_1(char *port){
|
||||
printf("SWIG pm3 constructor with port, open pm3\n");
|
||||
// printf("SWIG pm3 constructor with port, open pm3\n");
|
||||
pm3_device * p = pm3_open(port);
|
||||
p->script_embedded = 0;
|
||||
return p;
|
||||
}
|
||||
SWIGINTERN void delete_pm3(pm3 *self){
|
||||
if (self->script_embedded) {
|
||||
printf("SWIG pm3 destructor, nothing to do\n");
|
||||
// printf("SWIG pm3 destructor, nothing to do\n");
|
||||
} else {
|
||||
printf("SWIG pm3 destructor, close pm3\n");
|
||||
// printf("SWIG pm3 destructor, close pm3\n");
|
||||
pm3_close(self);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user