PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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