Mercurial > cpython-lru_cache-weakref
annotate Include/ucnhash.h @ 54294:dba767bc3155 legacy-trunk
remove mention of old ctypes version
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Sat, 23 May 2009 20:59:09 +0000 |
| parents | 3266a020a0da |
| children | 911df82bc25d |
| rev | line source |
|---|---|
|
16029
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
1 /* Unicode name database interface */ |
|
13055
cb8109e72877
Marc-Andre Lemburg <mal@lemburg.com>:
Marc-André Lemburg <mal@egenix.com>
parents:
diff
changeset
|
2 |
|
16029
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
3 #ifndef Py_UCNHASH_H |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
4 #define Py_UCNHASH_H |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
5 #ifdef __cplusplus |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
6 extern "C" { |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
7 #endif |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
8 |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
9 /* revised ucnhash CAPI interface (exported through a PyCObject) */ |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
10 |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
11 typedef struct { |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
12 |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
13 /* Size of this struct */ |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
14 int size; |
|
13055
cb8109e72877
Marc-Andre Lemburg <mal@lemburg.com>:
Marc-André Lemburg <mal@egenix.com>
parents:
diff
changeset
|
15 |
|
16029
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
16 /* Get name for a given character code. Returns non-zero if |
|
36924
48e0a5e39403
Update Unicode database to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
16029
diff
changeset
|
17 success, zero if not. Does not set Python exceptions. |
|
48e0a5e39403
Update Unicode database to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
16029
diff
changeset
|
18 If self is NULL, data come from the default version of the database. |
|
36927
3266a020a0da
Avoid forward-declaring the methods array.
Martin v. Löwis <martin@v.loewis.de>
parents:
36924
diff
changeset
|
19 If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */ |
|
36924
48e0a5e39403
Update Unicode database to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
16029
diff
changeset
|
20 int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen); |
|
13055
cb8109e72877
Marc-Andre Lemburg <mal@lemburg.com>:
Marc-André Lemburg <mal@egenix.com>
parents:
diff
changeset
|
21 |
|
16029
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
22 /* Get character code for a given name. Same error handling |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
23 as for getname. */ |
|
36924
48e0a5e39403
Update Unicode database to Unicode 4.1.
Martin v. Löwis <martin@v.loewis.de>
parents:
16029
diff
changeset
|
24 int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code); |
|
13055
cb8109e72877
Marc-Andre Lemburg <mal@lemburg.com>:
Marc-André Lemburg <mal@egenix.com>
parents:
diff
changeset
|
25 |
|
16029
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
26 } _PyUnicode_Name_CAPI; |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
27 |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
28 #ifdef __cplusplus |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
29 } |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
30 #endif |
|
55d89a8fe963
refactored the unicodeobject/ucnhash interface, to hide the
Fredrik Lundh <fredrik@pythonware.com>
parents:
13409
diff
changeset
|
31 #endif /* !Py_UCNHASH_H */ |
