From ae6ea9789ff395e2343d7c7a9eae551a64a74db5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 22 Sep 2009 16:36:48 +0300 Subject: [PATCH] Lose the useless python debug stuff --- python/Makefile.am | 2 +- python/rpmdebug-py.c | 76 ---------------------------------------------------- 2 files changed, 1 insertion(+), 77 deletions(-) delete mode 100644 python/rpmdebug-py.c diff --git a/python/Makefile.am b/python/Makefile.am index 5bdb4c1..9216146 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -1,6 +1,6 @@ # Makefile for rpm library. -EXTRA_DIST = rpmdebug-py.c rpm/__init__.py +EXTRA_DIST = rpm/__init__.py if PYTHON AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/ diff --git a/python/rpmdebug-py.c b/python/rpmdebug-py.c deleted file mode 100644 index be35ecb..0000000 --- a/python/rpmdebug-py.c +++ /dev/null @@ -1,76 +0,0 @@ - -extern PyTypeObject PyCode_Type; -extern PyTypeObject PyDictIter_Type; -extern PyTypeObject PyFrame_Type; - -#include "header-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 "rpmps-py.h" /* XXX debug only */ -#include "rpmmacro-py.h" /* XXX debug only */ -#include "rpmte-py.h" /* XXX debug only */ -#include "rpmts-py.h" /* XXX debug only */ - -/** - */ -static const char * lbl(void * s) -{ - PyObject * o = s; - - if (o == NULL) return "null"; - - if (o == Py_None) return "None"; - - - if (o->ob_type == &PyType_Type) return o->ob_type->tp_name; - - if (o->ob_type == &PyBaseObject_Type) return "BaseObj"; - if (o->ob_type == &PyBuffer_Type) return "Buffer"; - if (o->ob_type == &PyCFunction_Type) return "CFunction"; - if (o->ob_type == &PyCObject_Type) return "CObject"; - if (o->ob_type == &PyCell_Type) return "Cell"; - if (o->ob_type == &PyClass_Type) return "Class"; - if (o->ob_type == &PyClassMethod_Type) return "ClassMethod"; - if (o->ob_type == &PyStaticMethod_Type) return "StaticMethod"; - if (o->ob_type == &PyCode_Type) return "Code"; - if (o->ob_type == &PyComplex_Type) return "Complex"; - if (o->ob_type == &PyDict_Type) return "Dict"; -#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 4 - if (o->ob_type == &PyDictIter_Type) return "DictIter"; -#endif - if (o->ob_type == &PyFile_Type) return "File"; - if (o->ob_type == &PyFloat_Type) return "Float"; - if (o->ob_type == &PyFrame_Type) return "Frame"; - if (o->ob_type == &PyFunction_Type) return "Function"; - if (o->ob_type == &PyInstance_Type) return "Instance"; - 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 == &PyWrapperDescr_Type) return "WrapperDescr"; - if (o->ob_type == &PyProperty_Type) return "Property"; - if (o->ob_type == &PyModule_Type) return "Module"; - if (o->ob_type == &PyRange_Type) return "Range"; - if (o->ob_type == &PySeqIter_Type) return "SeqIter"; - if (o->ob_type == &PyCallIter_Type) return "CallIter"; - if (o->ob_type == &PySlice_Type) return "Slice"; - if (o->ob_type == &PyString_Type) return "String"; - if (o->ob_type == &PySuper_Type) return "Super"; - 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 == &rpmds_Type) return "rpmds"; - if (o->ob_type == &rpmfd_Type) return "rpmfd"; - if (o->ob_type == &rpmfi_Type) return "rpmfi"; - if (o->ob_type == &rpmfts_Type) return "rpmfts"; - if (o->ob_type == &rpmmi_Type) return "rpmmi"; - if (o->ob_type == &rpmps_Type) return "rpmps"; - if (o->ob_type == &rpmte_Type) return "rpmte"; - if (o->ob_type == &rpmts_Type) return "rpmts"; - - return "Unknown"; -} -- 2.7.4