manifest: use PyVarObject_HEAD_INIT
authorGregory Szorc <gregory.szorc@gmail.com>
Thu, 13 Oct 2016 13:17:23 +0200
changeset 30168 1a327889c13c
parent 30167 1e5ff5ae1d2b
child 30169 5f7151e6de85
manifest: use PyVarObject_HEAD_INIT More appeasing the Python 3 and compiler overlords. The code is equivalent.
mercurial/manifest.c
--- a/mercurial/manifest.c	Thu Oct 13 13:14:14 2016 +0200
+++ b/mercurial/manifest.c	Thu Oct 13 13:17:23 2016 +0200
@@ -262,8 +262,7 @@
 #endif
 
 static PyTypeObject lazymanifestEntriesIterator = {
-	PyObject_HEAD_INIT(NULL)
-	0,                               /*ob_size */
+	PyVarObject_HEAD_INIT(NULL, 0)
 	"parsers.lazymanifest.entriesiterator", /*tp_name */
 	sizeof(lmIter),                  /*tp_basicsize */
 	0,                               /*tp_itemsize */
@@ -311,8 +310,7 @@
 #endif
 
 static PyTypeObject lazymanifestKeysIterator = {
-	PyObject_HEAD_INIT(NULL)
-	0,                               /*ob_size */
+	PyVarObject_HEAD_INIT(NULL, 0)
 	"parsers.lazymanifest.keysiterator", /*tp_name */
 	sizeof(lmIter),                  /*tp_basicsize */
 	0,                               /*tp_itemsize */
@@ -890,8 +888,7 @@
 #endif
 
 static PyTypeObject lazymanifestType = {
-	PyObject_HEAD_INIT(NULL)
-	0,                                                /* ob_size */
+	PyVarObject_HEAD_INIT(NULL, 0)
 	"parsers.lazymanifest",                           /* tp_name */
 	sizeof(lazymanifest),                             /* tp_basicsize */
 	0,                                                /* tp_itemsize */