From 5b289d4491738eaa4f106eb69c70680406d63aa0 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 5 Oct 2009 09:26:43 +0300 Subject: [PATCH] Ugh, forgot to add the new _rpmb module to git - should've been in commit 8169bbde6934637ed7be58e18103330c1d5e4546 --- python/rpmbmodule.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 python/rpmbmodule.c diff --git a/python/rpmbmodule.c b/python/rpmbmodule.c new file mode 100644 index 0000000..2c18ed3 --- /dev/null +++ b/python/rpmbmodule.c @@ -0,0 +1,35 @@ +#include "rpmsystem-py.h" + +#include "spec-py.h" + +#include "debug.h" + +/* hmm.. figure something better */ +PyObject * pyrpmbError; + +static char rpmb__doc__[] = +""; + +void init_rpmb(void); /* XXX eliminate gcc warning */ + +void init_rpmb(void) +{ + PyObject * d, *m; + + if (PyType_Ready(&spec_Type) < 0) return; + + m = Py_InitModule3("_rpmb", NULL, rpmb__doc__); + if (m == NULL) + return; + + d = PyModule_GetDict(m); + + pyrpmbError = PyErr_NewException("_rpmb.error", NULL, NULL); + if (pyrpmbError != NULL) + PyDict_SetItemString(d, "error", pyrpmbError); + + Py_INCREF(&spec_Type); + PyModule_AddObject(m, "spec", (PyObject *) &spec_Type); + +} + -- 2.7.4