Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:18:09

0001 #ifndef Py_INTERNAL_HASH_H
0002 #define Py_INTERNAL_HASH_H
0003 
0004 #ifndef Py_BUILD_CORE
0005 #  error "this header requires Py_BUILD_CORE define"
0006 #endif
0007 
0008 
0009 struct pyhash_runtime_state {
0010     struct {
0011 #ifndef MS_WINDOWS
0012         int fd;
0013         dev_t st_dev;
0014         ino_t st_ino;
0015 #else
0016     // This is a placeholder so the struct isn't empty on Windows.
0017     int _not_used;
0018 #endif
0019     } urandom_cache;
0020 };
0021 
0022 #ifndef MS_WINDOWS
0023 # define _py_urandom_cache_INIT \
0024     { \
0025         .fd = -1, \
0026     }
0027 #else
0028 # define _py_urandom_cache_INIT {0}
0029 #endif
0030 
0031 #define pyhash_state_INIT \
0032     { \
0033         .urandom_cache = _py_urandom_cache_INIT, \
0034     }
0035 
0036 
0037 uint64_t _Py_KeyedHash(uint64_t, const char *, Py_ssize_t);
0038 
0039 
0040 #endif  // Py_INTERNAL_HASH_H