]> granicus.if.org Git - python/commitdiff
Tweak the deque struct by moving the least used fields (maxlen and weakref) to the...
authorRaymond Hettinger <python@rcn.com>
Sun, 14 Jul 2013 05:30:25 +0000 (22:30 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 14 Jul 2013 05:30:25 +0000 (22:30 -0700)
Modules/_collectionsmodule.c

index 21cc21dac9fda5a4f24da5b52352b8efb4420b21..5d5fc912a15c46c9285f0178ac713ad6707a074d 100644 (file)
@@ -119,8 +119,8 @@ typedef struct {
     block *rightblock;
     Py_ssize_t leftindex;       /* in range(BLOCKLEN) */
     Py_ssize_t rightindex;      /* in range(BLOCKLEN) */
+    long state;                 /* incremented whenever the indices move */
     Py_ssize_t maxlen;
-    long state;         /* incremented whenever the indices move */
     PyObject *weakreflist; /* List of weak references */
 } dequeobject;