Skip to content

Instantly share code, notes, and snippets.

@rsnemmen
Created February 8, 2018 13:50
Show Gist options
  • Select an option

  • Save rsnemmen/34acc813305b3df04be73989f73a1024 to your computer and use it in GitHub Desktop.

Select an option

Save rsnemmen/34acc813305b3df04be73989f73a1024 to your computer and use it in GitHub Desktop.
Interface file which serves as input to SWIG, SWIG tutorial
/*
example.i
"Interface file" which is the input to SWIG. Obtained
from http://www.swig.org/tutorial.html.
*/
%module example
%{
/* Put header files here or function declarations like below */
extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();
%}
extern double My_variable;
extern int fact(int n);
extern int my_mod(int x, int y);
extern char *get_time();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment