]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.10/Include/ucnhash.h
AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 1/5.
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Include / ucnhash.h
diff --git a/AppPkg/Applications/Python/Python-2.7.10/Include/ucnhash.h b/AppPkg/Applications/Python/Python-2.7.10/Include/ucnhash.h
new file mode 100644 (file)
index 0000000..8158730
--- /dev/null
@@ -0,0 +1,33 @@
+/* Unicode name database interface */\r
+\r
+#ifndef Py_UCNHASH_H\r
+#define Py_UCNHASH_H\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+/* revised ucnhash CAPI interface (exported through a "wrapper") */\r
+\r
+#define PyUnicodeData_CAPSULE_NAME "unicodedata.ucnhash_CAPI"\r
+\r
+typedef struct {\r
+\r
+    /* Size of this struct */\r
+    int size;\r
+\r
+    /* Get name for a given character code.  Returns non-zero if\r
+       success, zero if not.  Does not set Python exceptions. \r
+       If self is NULL, data come from the default version of the database.\r
+       If it is not NULL, it should be a unicodedata.ucd_X_Y_Z object */\r
+    int (*getname)(PyObject *self, Py_UCS4 code, char* buffer, int buflen);\r
+\r
+    /* Get character code for a given name.  Same error handling\r
+       as for getname. */\r
+    int (*getcode)(PyObject *self, const char* name, int namelen, Py_UCS4* code);\r
+\r
+} _PyUnicode_Name_CAPI;\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+#endif /* !Py_UCNHASH_H */\r