… | |
… | |
62 | #define lru_init lru_list.next = &lru_list; lru_list.prev = &lru_list /* other fields are zero */ |
62 | #define lru_init lru_list.next = &lru_list; lru_list.prev = &lru_list /* other fields are zero */ |
63 | |
63 | |
64 | /* this is primitive, yet effective */ |
64 | /* this is primitive, yet effective */ |
65 | /* the returned value must never be zero (or bad things will happen) */ |
65 | /* the returned value must never be zero (or bad things will happen) */ |
66 | #define lru_hash do { \ |
66 | #define lru_hash do { \ |
67 | hash = (((U32)dbh)>>2); \ |
67 | hash = (((U32)(long)dbh)>>2); \ |
68 | hash += *statement;\ |
68 | hash += *statement;\ |
69 | hash += len; \ |
69 | hash += len; \ |
70 | } while (0) |
70 | } while (0) |
71 | |
71 | |
72 | /* fetch and "use" */ |
72 | /* fetch and "use" */ |