diff options
author | jbj <devnull@localhost> | 2002-12-10 19:46:03 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-12-10 19:46:03 +0000 |
commit | fe6043016c84107132bd0dc80ef454d2c81342b7 (patch) | |
tree | ea5626d927f361cbd2b7bce8b4f6351b64240ec2 /python/rpmrc-py.c | |
parent | d412f8be53602c3a06d3b7b05a2fdae1af8a2b01 (diff) | |
download | rpm-fe6043016c84107132bd0dc80ef454d2c81342b7.tar.gz rpm-fe6043016c84107132bd0dc80ef454d2c81342b7.tar.bz2 rpm-fe6043016c84107132bd0dc80ef454d2c81342b7.zip |
Add tp_{init,alloc,new,free} methods to rpmts.
Use PyObject_{New,Del} consistently throughout.
CVS patchset: 5931
CVS date: 2002/12/10 19:46:03
Diffstat (limited to 'python/rpmrc-py.c')
-rw-r--r-- | python/rpmrc-py.c | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/python/rpmrc-py.c b/python/rpmrc-py.c index 4899260bb..25068f30d 100644 --- a/python/rpmrc-py.c +++ b/python/rpmrc-py.c @@ -12,30 +12,16 @@ #include "structmember.h" -/*@unchecked@*/ -extern PyTypeObject PyDictIter_Type; +#include "rpmdebug-py.c" #include <rpmcli.h> #include "rpmrc-py.h" -#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */ -#include "header-py.h" /* XXX debug only */ -#include "rpmal-py.h" /* XXX debug only */ -#include "rpmds-py.h" /* XXX debug only */ -#include "rpmfd-py.h" /* XXX debug only */ -#include "rpmfi-py.h" /* XXX debug only */ -#include "rpmmi-py.h" /* XXX debug only */ -#include "rpmte-py.h" /* XXX debug only */ -#include "rpmts-py.h" /* XXX debug only */ -#endif - #include "debug.h" -#if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */ /*@unchecked@*/ static int _rc_debug = 0; -#endif /** \ingroup python * \class Rpmrc @@ -78,46 +64,6 @@ PyObject * rpmrc_DelMacro(/*@unused@*/ PyObject * self, PyObject * args) } #if Py_TPFLAGS_HAVE_ITER /* XXX backport to python-1.5.2 */ -/** - */ -static const char * lbl(void * s) - /*@*/ -{ - PyObject * o = s; - - if (o == NULL) return "null"; - - if (o->ob_type == &PyType_Type) return o->ob_type->tp_name; - - if (o->ob_type == &PyClass_Type) return "Class"; - if (o->ob_type == &PyComplex_Type) return "Complex"; - if (o->ob_type == &PyDict_Type) return "Dict"; - if (o->ob_type == &PyDictIter_Type) return "DictIter"; - if (o->ob_type == &PyFile_Type) return "File"; - if (o->ob_type == &PyFloat_Type) return "Float"; - if (o->ob_type == &PyFunction_Type) return "Function"; - if (o->ob_type == &PyInt_Type) return "Int"; - if (o->ob_type == &PyList_Type) return "List"; - if (o->ob_type == &PyLong_Type) return "Long"; - if (o->ob_type == &PyMethod_Type) return "Method"; - if (o->ob_type == &PyModule_Type) return "Module"; - if (o->ob_type == &PyString_Type) return "String"; - if (o->ob_type == &PyTuple_Type) return "Tuple"; - if (o->ob_type == &PyType_Type) return "Type"; - if (o->ob_type == &PyUnicode_Type) return "Unicode"; - - if (o->ob_type == &hdr_Type) return "hdr"; - if (o->ob_type == &rpmal_Type) return "rpmal"; - if (o->ob_type == &rpmds_Type) return "rpmds"; - if (o->ob_type == &rpmfd_Type) return "rpmfd"; - if (o->ob_type == &rpmfi_Type) return "rpmfi"; - if (o->ob_type == &rpmmi_Type) return "rpmmi"; - if (o->ob_type == &rpmrc_Type) return "rpmrc"; - if (o->ob_type == &rpmte_Type) return "rpmte"; - if (o->ob_type == &rpmts_Type) return "rpmts"; - - return "Unknown"; -} /** */ |