Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | #ifndef Py_UCNHASH_H |
2 | #define Py_UCNHASH_H | |
3 | #ifdef __cplusplus | |
4 | extern "C" { | |
5 | #endif | |
6 | ||
7 | /* revised ucnhash CAPI interface (exported through a PyCObject) */ | |
8 | ||
9 | typedef struct { | |
10 | ||
11 | /* Size of this struct */ | |
12 | int size; | |
13 | ||
14 | /* Get name for a given character code. Returns non-zero if | |
15 | success, zero if not. Does not set Python exceptions. */ | |
16 | int (*getname)(Py_UCS4 code, char* buffer, int buflen); | |
17 | ||
18 | /* Get character code for a given name. Same error handling | |
19 | as for getname. */ | |
20 | int (*getcode)(const char* name, int namelen, Py_UCS4* code); | |
21 | ||
22 | } _PyUnicode_Name_CAPI; | |
23 | ||
24 | #ifdef __cplusplus | |
25 | } | |
26 | #endif | |
27 | #endif /* !Py_UCNHASH_H */ |