📄 dict.c
字号:
/* dict.C * John Viega * * September 1995 * Converted to C++ somewhere along the line. */#include "dict.H"#include "fatal.H"DummyBucket *dummy_bucket;/* ** Table of primes snagged from the Python 1.2 implementation. ** 7 is the first possible table size. We use one prime as the table ** size, which generates one hash key, and the previous prime to generate** a second hash key for subsequent rehashes.** If you have more than .8 billion keys, this library would need to** be changed.*/unsigned long int primes[] = { 3, 7, 13, 31, 61, 127, 251, 509, 1021, 2017, 4093, 5987, 9551, 15683, 19609, 31397, 65521L, 131071L, 262139L, 524287L, 1048573L, 2097143L, 4194301L, 8388593L, 16777213L, 33554393L, 67108859L, 134217689L, 268435399L, 536870909L, 1073741789L, 0};static int inited=0;void InitDummyBucket(){ if(inited) return; dummy_bucket = new DummyBucket(); if(!dummy_bucket) OutOfMemory(); inited = 1;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -