diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-15 06:18:07 +0100 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-15 06:18:07 +0100 |
| commit | 544804d5e19cd8890c069273bd93801689e6f8e7 (patch) | |
| tree | b390aecd238221e8b5e11119b0680c7ab2bbf711 /src/report-python/reportmodule.c | |
| parent | 2fa1f3ac7f960e4bf306e53c1aac06fe0e31a4ba (diff) | |
| download | abrt-544804d5e19cd8890c069273bd93801689e6f8e7.tar.gz abrt-544804d5e19cd8890c069273bd93801689e6f8e7.tar.xz abrt-544804d5e19cd8890c069273bd93801689e6f8e7.zip | |
python wrappers: add dump_dir wrapper
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/report-python/reportmodule.c')
| -rw-r--r-- | src/report-python/reportmodule.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/report-python/reportmodule.c b/src/report-python/reportmodule.c index 6d44d493..f98ba75e 100644 --- a/src/report-python/reportmodule.c +++ b/src/report-python/reportmodule.c @@ -21,6 +21,13 @@ PyObject *ReportError; +//static PyMethodDef module_methods[] = { +// { "dd_opendir" , p_dd_opendir, METH_VARARGS, NULL }; +// { "dd_create" , p_dd_create, METH_VARARGS, NULL }; +// { "delete_crash_dump_dir", p_delete_crash_dump_dir, METH_VARARGS, NULL }, +// { NULL } +//}; + #ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ #define PyMODINIT_FUNC void #endif @@ -34,6 +41,11 @@ init_pyreport(void) printf("PyType_Ready(&p_crash_data_type) < 0\n"); return; } + if (PyType_Ready(&p_dump_dir_type) < 0) + { + printf("PyType_Ready(&p_dump_dir_type) < 0\n"); + return; + } m = Py_InitModule3("_pyreport", /*module_methods:*/ NULL, "Python wrapper for libreport"); if (m == NULL) @@ -49,4 +61,7 @@ init_pyreport(void) Py_INCREF(&p_crash_data_type); PyModule_AddObject(m, "crash_data", (PyObject *)&p_crash_data_type); + + Py_INCREF(&p_dump_dir_type); + PyModule_AddObject(m, "dump_dir", (PyObject *)&p_dump_dir_type); } |
