##// END OF EJS Templates
manifest: drop Py_TPFLAGS_HAVE_SEQUENCE_IN from tp_flags in Python 3...
Gregory Szorc -
r30079:84debea7 default
parent child Browse files
Show More
@@ -254,6 +254,13 done:
254 return ret;
254 return ret;
255 }
255 }
256
256
257 #ifdef IS_PY3K
258 #define LAZYMANIFESTENTRIESITERATOR_TPFLAGS Py_TPFLAGS_DEFAULT
259 #else
260 #define LAZYMANIFESTENTRIESITERATOR_TPFLAGS Py_TPFLAGS_DEFAULT \
261 | Py_TPFLAGS_HAVE_ITER
262 #endif
263
257 static PyTypeObject lazymanifestEntriesIterator = {
264 static PyTypeObject lazymanifestEntriesIterator = {
258 PyObject_HEAD_INIT(NULL)
265 PyObject_HEAD_INIT(NULL)
259 0, /*ob_size */
266 0, /*ob_size */
@@ -275,9 +282,7 static PyTypeObject lazymanifestEntriesI
275 0, /*tp_getattro */
282 0, /*tp_getattro */
276 0, /*tp_setattro */
283 0, /*tp_setattro */
277 0, /*tp_as_buffer */
284 0, /*tp_as_buffer */
278 /* tp_flags: Py_TPFLAGS_HAVE_ITER tells python to
285 LAZYMANIFESTENTRIESITERATOR_TPFLAGS, /* tp_flags */
279 use tp_iter and tp_iternext fields. */
280 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
281 "Iterator for 3-tuples in a lazymanifest.", /* tp_doc */
286 "Iterator for 3-tuples in a lazymanifest.", /* tp_doc */
282 0, /* tp_traverse */
287 0, /* tp_traverse */
283 0, /* tp_clear */
288 0, /* tp_clear */
@@ -298,6 +303,13 static PyObject *lmiter_iterkeysnext(PyO
298 return PyString_FromStringAndSize(l->start, pl);
303 return PyString_FromStringAndSize(l->start, pl);
299 }
304 }
300
305
306 #ifdef IS_PY3K
307 #define LAZYMANIFESTKEYSITERATOR_TPFLAGS Py_TPFLAGS_DEFAULT
308 #else
309 #define LAZYMANIFESTKEYSITERATOR_TPFLAGS Py_TPFLAGS_DEFAULT \
310 | Py_TPFLAGS_HAVE_ITER
311 #endif
312
301 static PyTypeObject lazymanifestKeysIterator = {
313 static PyTypeObject lazymanifestKeysIterator = {
302 PyObject_HEAD_INIT(NULL)
314 PyObject_HEAD_INIT(NULL)
303 0, /*ob_size */
315 0, /*ob_size */
@@ -319,9 +331,7 static PyTypeObject lazymanifestKeysIter
319 0, /*tp_getattro */
331 0, /*tp_getattro */
320 0, /*tp_setattro */
332 0, /*tp_setattro */
321 0, /*tp_as_buffer */
333 0, /*tp_as_buffer */
322 /* tp_flags: Py_TPFLAGS_HAVE_ITER tells python to
334 LAZYMANIFESTKEYSITERATOR_TPFLAGS, /* tp_flags */
323 use tp_iter and tp_iternext fields. */
324 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
325 "Keys iterator for a lazymanifest.", /* tp_doc */
335 "Keys iterator for a lazymanifest.", /* tp_doc */
326 0, /* tp_traverse */
336 0, /* tp_traverse */
327 0, /* tp_clear */
337 0, /* tp_clear */
@@ -873,6 +883,12 static PyMethodDef lazymanifest_methods[
873 {NULL},
883 {NULL},
874 };
884 };
875
885
886 #ifdef IS_PY3K
887 #define LAZYMANIFEST_TPFLAGS Py_TPFLAGS_DEFAULT
888 #else
889 #define LAZYMANIFEST_TPFLAGS Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_SEQUENCE_IN
890 #endif
891
876 static PyTypeObject lazymanifestType = {
892 static PyTypeObject lazymanifestType = {
877 PyObject_HEAD_INIT(NULL)
893 PyObject_HEAD_INIT(NULL)
878 0, /* ob_size */
894 0, /* ob_size */
@@ -894,7 +910,7 static PyTypeObject lazymanifestType = {
894 0, /* tp_getattro */
910 0, /* tp_getattro */
895 0, /* tp_setattro */
911 0, /* tp_setattro */
896 0, /* tp_as_buffer */
912 0, /* tp_as_buffer */
897 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_SEQUENCE_IN, /* tp_flags */
913 LAZYMANIFEST_TPFLAGS, /* tp_flags */
898 "TODO(augie)", /* tp_doc */
914 "TODO(augie)", /* tp_doc */
899 0, /* tp_traverse */
915 0, /* tp_traverse */
900 0, /* tp_clear */
916 0, /* tp_clear */
General Comments 0
You need to be logged in to leave comments. Login now