Show More
@@ -254,6 +254,13 done: | |||
|
254 | 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 | 264 | static PyTypeObject lazymanifestEntriesIterator = { |
|
258 | 265 | PyObject_HEAD_INIT(NULL) |
|
259 | 266 | 0, /*ob_size */ |
@@ -275,9 +282,7 static PyTypeObject lazymanifestEntriesI | |||
|
275 | 282 | 0, /*tp_getattro */ |
|
276 | 283 | 0, /*tp_setattro */ |
|
277 | 284 | 0, /*tp_as_buffer */ |
|
278 | /* tp_flags: Py_TPFLAGS_HAVE_ITER tells python to | |
|
279 | use tp_iter and tp_iternext fields. */ | |
|
280 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER, | |
|
285 | LAZYMANIFESTENTRIESITERATOR_TPFLAGS, /* tp_flags */ | |
|
281 | 286 | "Iterator for 3-tuples in a lazymanifest.", /* tp_doc */ |
|
282 | 287 | 0, /* tp_traverse */ |
|
283 | 288 | 0, /* tp_clear */ |
@@ -298,6 +303,13 static PyObject *lmiter_iterkeysnext(PyO | |||
|
298 | 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 | 313 | static PyTypeObject lazymanifestKeysIterator = { |
|
302 | 314 | PyObject_HEAD_INIT(NULL) |
|
303 | 315 | 0, /*ob_size */ |
@@ -319,9 +331,7 static PyTypeObject lazymanifestKeysIter | |||
|
319 | 331 | 0, /*tp_getattro */ |
|
320 | 332 | 0, /*tp_setattro */ |
|
321 | 333 | 0, /*tp_as_buffer */ |
|
322 | /* tp_flags: Py_TPFLAGS_HAVE_ITER tells python to | |
|
323 | use tp_iter and tp_iternext fields. */ | |
|
324 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER, | |
|
334 | LAZYMANIFESTKEYSITERATOR_TPFLAGS, /* tp_flags */ | |
|
325 | 335 | "Keys iterator for a lazymanifest.", /* tp_doc */ |
|
326 | 336 | 0, /* tp_traverse */ |
|
327 | 337 | 0, /* tp_clear */ |
@@ -873,6 +883,12 static PyMethodDef lazymanifest_methods[ | |||
|
873 | 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 | 892 | static PyTypeObject lazymanifestType = { |
|
877 | 893 | PyObject_HEAD_INIT(NULL) |
|
878 | 894 | 0, /* ob_size */ |
@@ -894,7 +910,7 static PyTypeObject lazymanifestType = { | |||
|
894 | 910 | 0, /* tp_getattro */ |
|
895 | 911 | 0, /* tp_setattro */ |
|
896 | 912 | 0, /* tp_as_buffer */ |
|
897 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_SEQUENCE_IN, /* tp_flags */ | |
|
913 | LAZYMANIFEST_TPFLAGS, /* tp_flags */ | |
|
898 | 914 | "TODO(augie)", /* tp_doc */ |
|
899 | 915 | 0, /* tp_traverse */ |
|
900 | 916 | 0, /* tp_clear */ |
General Comments 0
You need to be logged in to leave comments.
Login now