[Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.69,2.70
Tim Peters
python-dev@python.org
Wed, 13 Dec 2000 11:58:27 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory slayer.i.sourceforge.net:/tmp/cvs-serv32693/python/dist/src/objects
Modified Files:
dictobject.c
Log Message:
Typo repair in comments. Fell for GregS's .popitem() poke.
Index: dictobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -r2.69 -r2.70
*** dictobject.c 2000/12/13 01:02:46 2.69
--- dictobject.c 2000/12/13 19:58:25 2.70
***************
*** 66,70 ****
key deletion. This is the only case in which me_value != NULL.
! 3. Dummy. me_key == dummy && me_value == NULL
Previously held an active (key, value) pair, but that was deleted and an
active pair has not yet overwritten the slot. Dummy can transition to
--- 66,70 ----
key deletion. This is the only case in which me_value != NULL.
! 3. Dummy. me_key == dummy and me_value == NULL
Previously held an active (key, value) pair, but that was deleted and an
active pair has not yet overwritten the slot. Dummy can transition to
***************
*** 72,75 ****
--- 72,79 ----
(cannot have me_key set to NULL), else the probe sequence in case of
collision would have no way to know they were once active.
+
+ Note: .popitem() abuses the me_hash field of an Unused or Dummy slot to
+ hold a search finger. The me_hash field of Unused or Dummy slots has no
+ meaning otherwise.
*/
typedef struct {
***************
*** 83,87 ****
/*
! To ensure the lookup algorithm terminates, there must be at least one Unsused
slot (NULL key) in the table.
The value ma_fill is the number of non-NULL keys (sum of Active and Dummy);
--- 87,91 ----
/*
! To ensure the lookup algorithm terminates, there must be at least one Unused
slot (NULL key) in the table.
The value ma_fill is the number of non-NULL keys (sum of Active and Dummy);