summaryrefslogtreecommitdiffstats
path: root/src/report-python/reportmodule.c
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-12-15 18:33:43 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-12-15 18:33:43 +0100
commit6da0fdade325c2ce0f371e661801e6beb1e70cdb (patch)
tree7e3d359498fcb1119f19fb34dbae923f19317083 /src/report-python/reportmodule.c
parent544804d5e19cd8890c069273bd93801689e6f8e7 (diff)
downloadabrt-6da0fdade325c2ce0f371e661801e6beb1e70cdb.tar.gz
abrt-6da0fdade325c2ce0f371e661801e6beb1e70cdb.tar.xz
abrt-6da0fdade325c2ce0f371e661801e6beb1e70cdb.zip
python wrappers: make crash_data.create_crash_dump_dir() work
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/report-python/reportmodule.c')
-rw-r--r--src/report-python/reportmodule.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/report-python/reportmodule.c b/src/report-python/reportmodule.c
index f98ba75e..5fa31ca2 100644
--- a/src/report-python/reportmodule.c
+++ b/src/report-python/reportmodule.c
@@ -21,12 +21,12 @@
PyObject *ReportError;
-//static PyMethodDef module_methods[] = {
-// { "dd_opendir" , p_dd_opendir, METH_VARARGS, NULL };
-// { "dd_create" , p_dd_create, METH_VARARGS, NULL };
+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 }
-//};
+ { NULL }
+};
#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */
#define PyMODINIT_FUNC void
@@ -47,8 +47,9 @@ init_pyreport(void)
return;
}
- m = Py_InitModule3("_pyreport", /*module_methods:*/ NULL, "Python wrapper for libreport");
- if (m == NULL)
+ m = Py_InitModule("_pyreport", module_methods);
+ //m = Py_InitModule3("_pyreport", module_methods, "Python wrapper for libreport");
+ if (!m)
{
printf("m == NULL\n");
return;