/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/lua/funcptr/example.i
12 строк
311 B
Erez Geva
More Lua tests (#3405)
31 май 2026, 17:09
31 май 2026, 17:09
a1b3ca8
Код
Авторство
О чём код?
%module example %{ #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 */ %constant int (*ADD)(int,int) = add; %constant int (*SUB)(int,int) = sub; %constant int (*MUL)(int,int) = mul;