/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Lib/python/pytyping.swg
36 строк
1 KB
William S Fulton
[Python] Only define pytyping typemaps where in typemaps are defined
23 июл 2026, 19:30
23 июл 2026, 19:30
50df6ce
Код
Авторство
О чём код?
/* ------------------------------------------------------------ * PEP 484 type hints for the primitive types and C strings * * The type hints for any other type are defined in the library * file providing the in and out typemaps for that type. * ------------------------------------------------------------ */ %typemap(pytyping) SWIGTYPE "typing.Any" %typemap(pytyping) bool, bool const & "bool" %typemap(pytyping) signed char, signed char const &, unsigned char, unsigned char const &, short, short const &, unsigned short, unsigned short const &, int, int const &, unsigned int, unsigned int const &, long, long const &, unsigned long, unsigned long const &, long long, long long const &, unsigned long long, unsigned long long const &, size_t, size_t const &, ptrdiff_t, ptrdiff_t const & "int" %typemap(pytyping) float, float const &, double, double const & "float" %typemap(pytyping) char, char const & "str" %typemap(pytyping) char * "typing.Optional[str]" %typemap(pytyping) void "None"