summaryrefslogtreecommitdiff
path: root/python/hashstring.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-06-25 18:53:47 +0200
committerJulian Andres Klode <jak@debian.org>2009-06-25 18:53:47 +0200
commite80500e7173387acc7a6b6be9d7424a4343ec036 (patch)
treed6bb50acbf46708cde2f22cb173bcf998bc9a921 /python/hashstring.cc
parenta4e69e11e544844034c3fbdc6789d5573f802117 (diff)
downloadpython-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/hashstring.cc')
-rw-r--r--python/hashstring.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/python/hashstring.cc b/python/hashstring.cc
index 23212a4b..6f70ac7e 100644
--- a/python/hashstring.cc
+++ b/python/hashstring.cc
@@ -95,10 +95,7 @@ static char *HashString_doc =
" HashString('MD5Sum', '6cc1b6e6655e3555ac47e5b5fe26d04e')\n\n"
"Valid options for 'type' are: MD5Sum, SHA1, SHA256.";
PyTypeObject PyHashString_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
-#if PY_MAJOR_VERSION < 3
- 0, // ob_size
-#endif
+ PyVarObject_HEAD_INIT(&PyType_Type, 0)
"apt_pkg.HashString", // tp_name
sizeof(CppPyObject<HashString*>), // tp_basicsize
0, // tp_itemsize