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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user