/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/voidtest.i
35 строк
802 B
William S Fulton
Move handling of void parameters from parser to typepass stage
09 ноя 2025, 14:47
09 ноя 2025, 14:47
1d9ace9
Код
Авторство
О чём код?
%module voidtest %inline %{ void globalfunc(void) {} typedef void VOID_TP; typedef VOID_TP VOID_TYPE; void globalfunc_typedef(VOID_TYPE) {} class Foo { public: Foo(void) { } void memberfunc(void) { } void* get_this() { return this; } static void staticmemberfunc(void) { } }; class FooVoidTypedef { public: FooVoidTypedef(VOID_TYPE) { } void memberfunc(VOID_TYPE) { } void memberfunc_const(VOID_TYPE) const { } void *memberfunc_const_voidptr(VOID_TYPE) const { return 0; } virtual ~FooVoidTypedef() { } static void staticmemberfunc(VOID_TYPE) { } }; void *vfunc1(void *f) { return f; } void *vfunc2(Foo *f) { return f; } Foo *vfunc3(void *f) { return (Foo *) f; } Foo *vfunc4(Foo *f) { return f; } bool test_pointers_equal(void *a, void *b) { return a == b; } %}