Chris@87: /* Unicode name database interface */ Chris@87: Chris@87: #ifndef Py_UCNHASH_H Chris@87: #define Py_UCNHASH_H Chris@87: #ifdef __cplusplus Chris@87: extern "C" { Chris@87: #endif Chris@87: Chris@87: /* revised ucnhash CAPI interface (exported through a "wrapper") */ Chris@87: Chris@87: #define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI" Chris@87: Chris@87: typedef struct { Chris@87: Chris@87: /* Size of this struct */ Chris@87: int size; Chris@87: Chris@87: /* Get name for a given character code. Returns non-zero if Chris@87: success, zero if not. Does not set Python exceptions. Chris@87: If self is NULL, data come from the default version of the database. Chris@87: If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ Chris@87: int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen); Chris@87: Chris@87: /* Get character code for a given name. Same error handling Chris@87: as for getname. */ Chris@87: int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code); Chris@87: Chris@87: } _PyUnicode_Name_CAPI; Chris@87: Chris@87: #ifdef __cplusplus Chris@87: } Chris@87: #endif Chris@87: #endif /* !Py_UCNHASH_H */