diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-07-13 14:25:06 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-07-13 14:25:06 +0200 |
| commit | dabc8c6796afdaf0e2918db77117a07eae8b1fd4 (patch) | |
| tree | 14f67c48740003783572bc8d1fa2b5eba9bf9cca /python/configuration.cc | |
| parent | b0abeea43f6e51c452af68d8ec9bf3d0f701d772 (diff) | |
| download | python-apt-dabc8c6796afdaf0e2918db77117a07eae8b1fd4.tar.gz | |
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.
Diffstat (limited to 'python/configuration.cc')
| -rw-r--r-- | python/configuration.cc | 16 |
1 files changed, 8 insertions, 8 deletions
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<Configuration *>(Obj); return GetCpp<Configuration>(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 }; |
