Import error codes directly from libmailutils to Python.
* python/libmu_py/Makefile.am (libmu_py_la_SOURCES): Add errno.c * python/libmu_py/errno.c: New file. * python/libmu_py/libmu_py.c (_mu_py_module_name): New function. (_mu_py_attach_module): Use _mu_py_module_name to allocate FQ module name instead of taking the risk of using fixed size buffer. Don't call Py_InitModule if methods is NULL. (mu_py_attach_modules): Call _mu_py_attach_errno. * python/libmu_py/libmu_py.h (_mu_py_attach_errno): New proto. * python/mailutils/error.py: Re-export everything from c_api.errno. Remove hardcoded definitions of error codes.
Showing
5 changed files
with
55 additions
and
85 deletions
python/libmu_py/errno.c
0 → 100644
-
Please register or sign in to post a comment