00001
00002
00003 extern PyTypeObject PyCode_Type;
00004
00005 extern PyTypeObject PyDictIter_Type;
00006
00007 extern PyTypeObject PyFrame_Type;
00008
00009 #include <rpmcli.h>
00010
00011 #include "header-py.h"
00012 #include "rpmal-py.h"
00013 #include "rpmds-py.h"
00014 #include "rpmfd-py.h"
00015 #include "rpmfi-py.h"
00016 #include "rpmfts-py.h"
00017 #include "rpmmi-py.h"
00018 #include "rpmps-py.h"
00019 #include "rpmrc-py.h"
00020 #include "rpmte-py.h"
00021 #include "rpmts-py.h"
00022
00025
00026 static const char * lbl(void * s)
00027
00028 {
00029 PyObject * o = s;
00030
00031 if (o == NULL) return "null";
00032
00033 if (o == Py_None) return "None";
00034
00035
00036 if (o->ob_type == &PyType_Type) return o->ob_type->tp_name;
00037
00038 if (o->ob_type == &PyBaseObject_Type) return "BaseObj";
00039 if (o->ob_type == &PyBuffer_Type) return "Buffer";
00040 if (o->ob_type == &PyCFunction_Type) return "CFunction";
00041 if (o->ob_type == &PyCObject_Type) return "CObject";
00042 if (o->ob_type == &PyCell_Type) return "Cell";
00043 if (o->ob_type == &PyClass_Type) return "Class";
00044 if (o->ob_type == &PyClassMethod_Type) return "ClassMethod";
00045 if (o->ob_type == &PyStaticMethod_Type) return "StaticMethod";
00046 if (o->ob_type == &PyCode_Type) return "Code";
00047 if (o->ob_type == &PyComplex_Type) return "Complex";
00048 if (o->ob_type == &PyDict_Type) return "Dict";
00049 #if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 4
00050 if (o->ob_type == &PyDictIter_Type) return "DictIter";
00051 #endif
00052 if (o->ob_type == &PyFile_Type) return "File";
00053 if (o->ob_type == &PyFloat_Type) return "Float";
00054 if (o->ob_type == &PyFrame_Type) return "Frame";
00055 if (o->ob_type == &PyFunction_Type) return "Function";
00056 if (o->ob_type == &PyInstance_Type) return "Instance";
00057 if (o->ob_type == &PyInt_Type) return "Int";
00058 if (o->ob_type == &PyList_Type) return "List";
00059 if (o->ob_type == &PyLong_Type) return "Long";
00060 if (o->ob_type == &PyMethod_Type) return "Method";
00061 if (o->ob_type == &PyWrapperDescr_Type) return "WrapperDescr";
00062 if (o->ob_type == &PyProperty_Type) return "Property";
00063 if (o->ob_type == &PyModule_Type) return "Module";
00064 if (o->ob_type == &PyRange_Type) return "Range";
00065 if (o->ob_type == &PySeqIter_Type) return "SeqIter";
00066 if (o->ob_type == &PyCallIter_Type) return "CallIter";
00067 if (o->ob_type == &PySlice_Type) return "Slice";
00068 if (o->ob_type == &PyString_Type) return "String";
00069 if (o->ob_type == &PySuper_Type) return "Super";
00070 if (o->ob_type == &PyTuple_Type) return "Tuple";
00071 if (o->ob_type == &PyType_Type) return "Type";
00072 if (o->ob_type == &PyUnicode_Type) return "Unicode";
00073
00074 if (o->ob_type == &hdr_Type) return "hdr";
00075 if (o->ob_type == &rpmal_Type) return "rpmal";
00076 if (o->ob_type == &rpmds_Type) return "rpmds";
00077 if (o->ob_type == &rpmfd_Type) return "rpmfd";
00078 if (o->ob_type == &rpmfi_Type) return "rpmfi";
00079 if (o->ob_type == &rpmfts_Type) return "rpmfts";
00080 if (o->ob_type == &rpmmi_Type) return "rpmmi";
00081 if (o->ob_type == &rpmps_Type) return "rpmps";
00082 if (o->ob_type == &rpmrc_Type) return "rpmrc";
00083 if (o->ob_type == &rpmte_Type) return "rpmte";
00084 if (o->ob_type == &rpmts_Type) return "rpmts";
00085
00086 return "Unknown";
00087 }