From dabc8c6796afdaf0e2918db77117a07eae8b1fd4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 13 Jul 2009 14:25:06 +0200 Subject: python: Rename all PyTypeObject's to conform to PEP 7. This is the first step towards implementing coding guidelines for the C++ code and providing an usable C++ API. --- python/configuration.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'python/configuration.cc') diff --git a/python/configuration.cc b/python/configuration.cc index 07f55957..c7d7d796 100644 --- a/python/configuration.cc +++ b/python/configuration.cc @@ -49,7 +49,7 @@ void CnfSubFree(PyObject *Obj) /* */ static inline Configuration &GetSelf(PyObject *Obj) { - if (Obj->ob_type == &ConfigurationPtrType) + if (Obj->ob_type == &PyConfigurationPtr_Type) return *GetCpp(Obj); return GetCpp(Obj); } @@ -161,8 +161,8 @@ static PyObject *CnfSubTree(PyObject *Self,PyObject *Args) } // Create a new sub configuration. - SubConfiguration *New = (SubConfiguration*)(&ConfigurationSubType) - ->tp_alloc(&ConfigurationSubType,0); + SubConfiguration *New = (SubConfiguration*)(&PyConfigurationSub_Type) + ->tp_alloc(&PyConfigurationSub_Type,0); new (&New->Object) Configuration(Itm); New->Owner = Self; Py_INCREF(Self); @@ -501,7 +501,7 @@ static PyObject *CnfNew(PyTypeObject *type, PyObject *args, PyObject *kwds) { // Type for a Normal Configuration object static PySequenceMethods ConfigurationSeq = {0,0,0,0,0,0,0,CnfContains,0,0}; static PyMappingMethods ConfigurationMap = {0,CnfMap,CnfMapSet}; -PyTypeObject ConfigurationType = +PyTypeObject PyConfiguration_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "apt_pkg.Configuration", // tp_name @@ -545,7 +545,7 @@ PyTypeObject ConfigurationType = CnfNew, // tp_new }; -PyTypeObject ConfigurationPtrType = +PyTypeObject PyConfigurationPtr_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "apt_pkg.ConfigurationPtr", // tp_name @@ -578,10 +578,10 @@ PyTypeObject ConfigurationPtrType = CnfMethods, // tp_methods 0, // tp_members 0, // tp_getset - &ConfigurationType, // tp_base + &PyConfiguration_Type, // tp_base }; -PyTypeObject ConfigurationSubType = +PyTypeObject PyConfigurationSub_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "apt_pkg.ConfigurationSub", // tp_name @@ -614,6 +614,6 @@ PyTypeObject ConfigurationSubType = CnfMethods, // tp_methods 0, // tp_members 0, // tp_getset - &ConfigurationType, // tp_base + &PyConfiguration_Type, // tp_base }; -- cgit v1.2.3