]>
Commit | Line | Data |
---|---|---|
4710c53d | 1 | /* Unicode name database interface */\r |
2 | \r | |
3 | #ifndef Py_UCNHASH_H\r | |
4 | #define Py_UCNHASH_H\r | |
5 | #ifdef __cplusplus\r | |
6 | extern "C" {\r | |
7 | #endif\r | |
8 | \r | |
9 | /* revised ucnhash CAPI interface (exported through a "wrapper") */\r | |
10 | \r | |
11 | #define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI"\r | |
12 | \r | |
13 | typedef struct {\r | |
14 | \r | |
15 | /* Size of this struct */\r | |
16 | int size;\r | |
17 | \r | |
18 | /* Get name for a given character code. Returns non-zero if\r | |
19 | success, zero if not. Does not set Python exceptions. \r | |
20 | If self is NULL, data come from the default version of the database.\r | |
21 | If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */\r | |
22 | int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen);\r | |
23 | \r | |
24 | /* Get character code for a given name. Same error handling\r | |
25 | as for getname. */\r | |
26 | int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code);\r | |
27 | \r | |
28 | } _PyUnicode_Name_CAPI;\r | |
29 | \r | |
30 | #ifdef __cplusplus\r | |
31 | }\r | |
32 | #endif\r | |
33 | #endif /* !Py_UCNHASH_H */\r |