diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2010-03-24 10:24:55 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2010-06-11 10:17:26 +0300 |
commit | 2ded15368cfcce4206ddaa5ebd85ddfff2ac533b (patch) | |
tree | ba7ff3e90646dac66e46c4dd290e2919c0879f2c | |
parent | 9a93c9364d15cb569c6c9492be9ed992d28a3fc3 (diff) | |
download | rpm-2ded15368cfcce4206ddaa5ebd85ddfff2ac533b.tar.gz |
Add RPMBUILD_ISFOO constants to python rpmb module (ticket #123)
(cherry picked from commit ee98a373cf79d3248122ae147d98ac461d59c9b7)
-rw-r--r-- | python/rpmbmodule.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/rpmbmodule.c b/python/rpmbmodule.c index 9617c5819..5668a1a03 100644 --- a/python/rpmbmodule.c +++ b/python/rpmbmodule.c @@ -25,6 +25,12 @@ static int initModule(PyObject *m) Py_INCREF(&specPkg_Type); PyModule_AddObject(m, "specPkg", (PyObject *) &specPkg_Type); +#define REGISTER_ENUM(val) PyModule_AddIntConstant(m, #val, val) + REGISTER_ENUM(RPMBUILD_ISSOURCE); + REGISTER_ENUM(RPMBUILD_ISPATCH); + REGISTER_ENUM(RPMBUILD_ISICON); + REGISTER_ENUM(RPMBUILD_ISNO); + return 1; } |