File tree 5 files changed +24
-13
lines changed
5 files changed +24
-13
lines changed Original file line number Diff line number Diff line change
1
+ #ifndef Py_CPYTHON_HASH_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ /* hash function definition */
6
+ typedef struct {
7
+ Py_hash_t (* const hash )(const void * , Py_ssize_t );
8
+ const char * name ;
9
+ const int hash_bits ;
10
+ const int seed_bits ;
11
+ } PyHash_FuncDef ;
12
+
13
+ PyAPI_FUNC (PyHash_FuncDef * ) PyHash_GetFuncDef (void );
Original file line number Diff line number Diff line change 4
4
extern "C" {
5
5
#endif
6
6
7
- #ifndef Py_LIMITED_API
8
- /* hash function definition */
9
- typedef struct {
10
- Py_hash_t (* const hash )(const void * , Py_ssize_t );
11
- const char * name ;
12
- const int hash_bits ;
13
- const int seed_bits ;
14
- } PyHash_FuncDef ;
15
-
16
- PyAPI_FUNC (PyHash_FuncDef * ) PyHash_GetFuncDef (void );
17
- #endif
18
-
19
-
20
7
/* Cutoff for small string DJBX33A optimization in range [1, cutoff).
21
8
*
22
9
* About 50% of the strings in a typical Python application are smaller than
@@ -60,6 +47,12 @@ PyAPI_FUNC(PyHash_FuncDef*) PyHash_GetFuncDef(void);
60
47
# endif /* uint64_t && uint32_t && aligned */
61
48
#endif /* Py_HASH_ALGORITHM */
62
49
50
+ #ifndef Py_LIMITED_API
51
+ # define Py_CPYTHON_HASH_H
52
+ # include "cpython/pyhash.h"
53
+ # undef Py_CPYTHON_HASH_H
54
+ #endif
55
+
63
56
#ifdef __cplusplus
64
57
}
65
58
#endif
Original file line number Diff line number Diff line change @@ -1768,6 +1768,7 @@ PYTHON_HEADERS= \
1768
1768
$(srcdir)/Include/cpython/pyerrors.h \
1769
1769
$(srcdir)/Include/cpython/pyfpe.h \
1770
1770
$(srcdir)/Include/cpython/pyframe.h \
1771
+ $(srcdir)/Include/cpython/pyhash.h \
1771
1772
$(srcdir)/Include/cpython/pylifecycle.h \
1772
1773
$(srcdir)/Include/cpython/pymem.h \
1773
1774
$(srcdir)/Include/cpython/pystate.h \
Original file line number Diff line number Diff line change 172
172
<ClInclude Include =" ..\Include\cpython\pyerrors.h" />
173
173
<ClInclude Include =" ..\Include\cpython\pyfpe.h" />
174
174
<ClInclude Include =" ..\Include\cpython\pyframe.h" />
175
+ <ClInclude Include =" ..\Include\cpython\pyhash.h" />
175
176
<ClInclude Include =" ..\Include\cpython\pylifecycle.h" />
176
177
<ClInclude Include =" ..\Include\cpython\pymem.h" />
177
178
<ClInclude Include =" ..\Include\cpython\pystate.h" />
Original file line number Diff line number Diff line change 468
468
<ClInclude Include =" ..\Include\cpython\pyframe.h" >
469
469
<Filter >Include\cpython</Filter >
470
470
</ClInclude >
471
+ <ClInclude Include =" ..\Include\cpython\pyhash.h" >
472
+ <Filter >Include\cpython</Filter >
473
+ </ClInclude >
471
474
<ClInclude Include =" ..\Include\cpython\pylifecycle.h" >
472
475
<Filter >Include\cpython</Filter >
473
476
</ClInclude >
You can’t perform that action at this time.
0 commit comments