summaryrefslogtreecommitdiffstats
path: root/Objects/setobject.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-09-08 07:25:57 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-09-08 07:25:57 (GMT)
commit742d8716ff08358a585406cde5b03e71d46968c0 (patch)
treef764d8c3c3787b4089b1ffa7c0a0a03e070d5691 /Objects/setobject.c
parentf367962d86417963d97d8f77469e0d14a49ea4a1 (diff)
downloadcpython-742d8716ff08358a585406cde5b03e71d46968c0.zip
cpython-742d8716ff08358a585406cde5b03e71d46968c0.tar.gz
cpython-742d8716ff08358a585406cde5b03e71d46968c0.tar.bz2
Put the defines in the logical section and fix indentation.
Diffstat (limited to 'Objects/setobject.c')
-rw-r--r--Objects/setobject.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 9df2fd3..23d624f 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -31,12 +31,6 @@
#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;