]> granicus.if.org Git - python/commitdiff
Put the defines in the logical section and fix indentation.
authorRaymond Hettinger <python@rcn.com>
Sun, 8 Sep 2013 07:25:57 +0000 (00:25 -0700)
committerRaymond Hettinger <python@rcn.com>
Sun, 8 Sep 2013 07:25:57 +0000 (00:25 -0700)
Objects/setobject.c

index 9df2fd322fb4010a8ce1b327a3939460e165ac27..23d624f9158e70525bc7b2d30da6f14052b2d958 100644 (file)
 #include "structmember.h"
 #include "stringlib/eq.h"
 
-/* This must be >= 1 */
-#define PERTURB_SHIFT 5
-
-/* This should be >= PySet_MINSIZE - 1 */
-#define LINEAR_PROBES 9
-
 /* Object used as dummy key to fill deleted entries */
 static PyObject _dummy_struct;
 
@@ -49,6 +43,12 @@ PyObject *_PySet_Dummy = dummy;
 /* ======================================================================== */
 /* ======= Begin logic for probing the hash table ========================= */
 
+/* This should be >= PySet_MINSIZE - 1 */
+#define LINEAR_PROBES 9
+
+/* This must be >= 1 */
+#define PERTURB_SHIFT 5
+
 static setentry *
 set_lookkey(PySetObject *so, PyObject *key, Py_hash_t hash)
 {
@@ -151,8 +151,8 @@ set_lookkey_unicode(PySetObject *so, PyObject *key, Py_hash_t hash)
     while (1) {
         if (entry->key == key
             || (entry->hash == hash
-            && entry->key != dummy
-            && unicode_eq(entry->key, key)))
+                && entry->key != dummy
+                && unicode_eq(entry->key, key)))
             return entry;
         if (entry->key == dummy && freeslot == NULL)
             freeslot = entry;