Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /* Unicode name database interface */
0002 #ifndef Py_INTERNAL_UCNHASH_H
0003 #define Py_INTERNAL_UCNHASH_H
0004 #ifdef __cplusplus
0005 extern "C" {
0006 #endif
0007 
0008 #ifndef Py_BUILD_CORE
0009 #  error "this header requires Py_BUILD_CORE define"
0010 #endif
0011 
0012 /* revised ucnhash CAPI interface (exported through a "wrapper") */
0013 
0014 #define PyUnicodeData_CAPSULE_NAME "unicodedata._ucnhash_CAPI"
0015 
0016 typedef struct {
0017 
0018     /* Get name for a given character code.
0019        Returns non-zero if success, zero if not.
0020        Does not set Python exceptions. */
0021     int (*getname)(Py_UCS4 code, char* buffer, int buflen,
0022                    int with_alias_and_seq);
0023 
0024     /* Get character code for a given name.
0025        Same error handling as for getname(). */
0026     int (*getcode)(const char* name, int namelen, Py_UCS4* code,
0027                    int with_named_seq);
0028 
0029 } _PyUnicode_Name_CAPI;
0030 
0031 #ifdef __cplusplus
0032 }
0033 #endif
0034 #endif /* !Py_INTERNAL_UCNHASH_H */