- rename example modules from "example" to "swigexample", to avoid a warning from shadowing the Octave built-in function "example" - remove deprecated "static" Makefile targets: there is no longer an option to build static Octave modules in the Examples Makefile - emacs whitespace cleanup run on all files
17 lines
354 B
OpenEdge ABL
17 lines
354 B
OpenEdge ABL
/* File : example.i */
|
|
%module swigexample
|
|
%{
|
|
#include "example.h"
|
|
%}
|
|
|
|
/* Wrap a function taking a pointer to a function */
|
|
extern int do_op(int a, int b, int (*op)(int, int));
|
|
|
|
/* Now install a bunch of "ops" as constants */
|
|
%callback("%(upper)s");
|
|
int add(int, int);
|
|
int sub(int, int);
|
|
int mul(int, int);
|
|
%nocallback;
|
|
|
|
extern int (*funcvar)(int,int);
|