/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/python/exception/example.i
26 строк
561 B
William S Fulton
Examples update to support C++17: exception specification throw removal
04 май 2018, 22:02
04 май 2018, 22:02
c9a10eb
Код
Авторство
О чём код?
/* File : example.i */ %module example %{ #include "example.h" %} %include "std_string.i" %catches(int) Test::simple(); %catches(const char *) Test::message(); %catches(Exc) Test::hosed(); %catches(A*) Test::unknown(); %catches(int, const char *, Exc) Test::multi(int x); /* Let's just grab the original header file here */ %include "example.h" %inline %{ // The -builtin SWIG option results in SWIGPYTHON_BUILTIN being defined #ifdef SWIGPYTHON_BUILTIN bool is_python_builtin() { return true; } #else bool is_python_builtin() { return false; } #endif %}