Mercurial > repos > rliterman > csp2
annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/python3.8/ucnhash.h @ 69:33d812a61356
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 17:55:14 -0400 |
parents | |
children |
rev | line source |
---|---|
jpayne@69 | 1 /* Unicode name database interface */ |
jpayne@69 | 2 #ifndef Py_LIMITED_API |
jpayne@69 | 3 #ifndef Py_UCNHASH_H |
jpayne@69 | 4 #define Py_UCNHASH_H |
jpayne@69 | 5 #ifdef __cplusplus |
jpayne@69 | 6 extern "C" { |
jpayne@69 | 7 #endif |
jpayne@69 | 8 |
jpayne@69 | 9 /* revised ucnhash CAPI interface (exported through a "wrapper") */ |
jpayne@69 | 10 |
jpayne@69 | 11 #define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI" |
jpayne@69 | 12 |
jpayne@69 | 13 typedef struct { |
jpayne@69 | 14 |
jpayne@69 | 15 /* Size of this struct */ |
jpayne@69 | 16 int size; |
jpayne@69 | 17 |
jpayne@69 | 18 /* Get name for a given character code. Returns non-zero if |
jpayne@69 | 19 success, zero if not. Does not set Python exceptions. |
jpayne@69 | 20 If self is NULL, data come from the default version of the database. |
jpayne@69 | 21 If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ |
jpayne@69 | 22 int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen, |
jpayne@69 | 23 int with_alias_and_seq); |
jpayne@69 | 24 |
jpayne@69 | 25 /* Get character code for a given name. Same error handling |
jpayne@69 | 26 as for getname. */ |
jpayne@69 | 27 int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code, |
jpayne@69 | 28 int with_named_seq); |
jpayne@69 | 29 |
jpayne@69 | 30 } _PyUnicode_Name_CAPI; |
jpayne@69 | 31 |
jpayne@69 | 32 #ifdef __cplusplus |
jpayne@69 | 33 } |
jpayne@69 | 34 #endif |
jpayne@69 | 35 #endif /* !Py_UCNHASH_H */ |
jpayne@69 | 36 #endif /* !Py_LIMITED_API */ |