diff options
| author | Julian Andres Klode <jak@debian.org> | 2009-06-25 18:53:47 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2009-06-25 18:53:47 +0200 |
| commit | e80500e7173387acc7a6b6be9d7424a4343ec036 (patch) | |
| tree | d6bb50acbf46708cde2f22cb173bcf998bc9a921 /python/acquire.cc | |
| parent | a4e69e11e544844034c3fbdc6789d5573f802117 (diff) | |
| download | python-apt-e80500e7173387acc7a6b6be9d7424a4343ec036.tar.gz | |
python: Use PyVarObject_HEAD_INIT() instead of PyObject_HEAD_INIT().
This is related to PEP 3123 and fixes some compiler warnings.
Diffstat (limited to 'python/acquire.cc')
| -rw-r--r-- | python/acquire.cc | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/python/acquire.cc b/python/acquire.cc index a36012bc..6c6c2ea4 100644 --- a/python/acquire.cc +++ b/python/acquire.cc @@ -105,10 +105,7 @@ static PyObject *AcquireItemRepr(PyObject *Self) PyTypeObject AcquireItemType = { - PyObject_HEAD_INIT(&PyType_Type) - #if PY_MAJOR_VERSION < 3 - 0, // ob_size - #endif + PyVarObject_HEAD_INIT(&PyType_Type, 0) "apt_pkg.AcquireItem", // tp_name sizeof(CppOwnedPyObject<pkgAcquire::ItemIterator>), // tp_basicsize 0, // tp_itemsize @@ -267,10 +264,7 @@ static char *doc_PkgAcquire = "Acquire(progress) -> Acquire() object.\n\n" PyTypeObject PkgAcquireType = { - PyObject_HEAD_INIT(&PyType_Type) - #if PY_MAJOR_VERSION < 3 - 0, // ob_size - #endif + PyVarObject_HEAD_INIT(&PyType_Type, 0) "apt_pkg.Acquire", // tp_name sizeof(CppPyObject<pkgAcquire*>), // tp_basicsize 0, // tp_itemsize @@ -360,11 +354,8 @@ static char *doc_PkgAcquireFile = PyTypeObject PkgAcquireFileType = { - PyObject_HEAD_INIT(&PyType_Type) - #if PY_MAJOR_VERSION < 3 - 0, // ob_size - #endif - "apt_pkg.AcquireFile", // tp_name + PyVarObject_HEAD_INIT(&PyType_Type, 0) + "apt_pkg.AcquireFile", // tp_name sizeof(CppOwnedPyObject<pkgAcqFile*>),// tp_basicsize 0, // tp_itemsize // Methods |
