Ugh, forgot to add the new _rpmb module to git

- should've been in commit 8169bbde69
This commit is contained in:
Panu Matilainen 2009-10-05 09:26:43 +03:00
parent 9b20c706a4
commit 5b289d4491
1 changed files with 35 additions and 0 deletions

35
python/rpmbmodule.c Normal file
View File

@ -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);
}