Message110303
On the second thought, this comment:
- /* Cached hash code of me_key. Note that hash codes are C longs.
- * We have to use Py_ssize_t instead because dict_popitem() abuses
- * me_hash to hold a search finger.
- */
suggests that a union may be appropriate here. I am not sure of the standards standing of anonymous unions, but if we could do
union {
Py_ssize_t me_finger;
long me_hash;
};
it would cleanly solve the problem. If anonymous unions are not available, a regular union could also do the trick:
union {
Py_ssize_t finger;
long hash;
} me;
and use me.finger where me is used as search finger and me.hash where it stores hash. Less clever naming scheme would be welcome, though. |
|
Date |
User |
Action |
Args |
2010-07-14 17:41:40 | belopolsky | set | recipients:
+ belopolsky, tim.peters, loewis, georg.brandl, jimjjewett, pitrou, ked-tao, BreamoreBoy |
2010-07-14 17:41:40 | belopolsky | set | messageid: <1279129300.27.0.929691532618.issue1646068@psf.upfronthosting.co.za> |
2010-07-14 17:41:38 | belopolsky | link | issue1646068 messages |
2010-07-14 17:41:38 | belopolsky | create | |
|