SWIG experiments

This commit is contained in:
Philippe Teuwen
2020-05-28 02:13:21 +02:00
parent 62ce1cdf13
commit a503dfcd98
34 changed files with 8106 additions and 15 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifndef LIBPM3_H
#define LIBPM3_H
#ifdef SWIG
%module pm3
%{
/* Include the header in the wrapper code */
#include "pm3.h"
%}
/* Strip "pm3_" from API functions for SWIG */
%rename("%(strip:[pm3_])s") "";
%feature("immutable","1") pm3_current_dev;
/* Parse the header file to generate wrappers */
#endif
typedef struct pm3_device pm3_device;
pm3_device* pm3_open(char *port);
int pm3_console(pm3_device* dev, char *cmd);
void pm3_close(pm3_device* dev);
pm3_device* pm3_get_current_dev(void);
#endif