/Include/ucnhash.h

http://unladen-swallow.googlecode.com/ · C++ Header · 31 lines · 14 code · 8 blank · 9 comment · 0 complexity · 2694b198714dc0b57e78dd73b2f85210 MD5 · raw file

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