summaryrefslogtreecommitdiffstats
path: root/Modules/unicodedata.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r--Modules/unicodedata.c37
1 files changed, 3 insertions, 34 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 507cef3..e89c92d 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -73,6 +73,8 @@ typedef struct previous_version {
Py_UCS4 (*normalization)(Py_UCS4);
} PreviousDBVersion;
+#include "clinic/unicodedata.c.h"
+
#define get_old_record(self, v) ((((PreviousDBVersion*)self)->getrecord)(v))
static PyMemberDef DB_members[] = {
@@ -130,42 +132,9 @@ as integer. If no such value is defined, default is returned, or, if
not given, ValueError is raised.
[clinic start generated code]*/
-PyDoc_STRVAR(unicodedata_UCD_decimal__doc__,
-"decimal($self, unichr, default=None, /)\n"
-"--\n"
-"\n"
-"Converts a Unicode character into its equivalent decimal value.\n"
-"\n"
-"Returns the decimal value assigned to the Unicode character unichr\n"
-"as integer. If no such value is defined, default is returned, or, if\n"
-"not given, ValueError is raised.");
-
-#define UNICODEDATA_UCD_DECIMAL_METHODDEF \
- {"decimal", (PyCFunction)unicodedata_UCD_decimal, METH_VARARGS, unicodedata_UCD_decimal__doc__},
-
-static PyObject *
-unicodedata_UCD_decimal_impl(PreviousDBVersion *self, PyUnicodeObject *unichr, PyObject *default_value);
-
-static PyObject *
-unicodedata_UCD_decimal(PreviousDBVersion *self, PyObject *args)
-{
- PyObject *return_value = NULL;
- PyUnicodeObject *unichr;
- PyObject *default_value = NULL;
-
- if (!PyArg_ParseTuple(args,
- "O!|O:decimal",
- &PyUnicode_Type, &unichr, &default_value))
- goto exit;
- return_value = unicodedata_UCD_decimal_impl(self, unichr, default_value);
-
-exit:
- return return_value;
-}
-
static PyObject *
unicodedata_UCD_decimal_impl(PreviousDBVersion *self, PyUnicodeObject *unichr, PyObject *default_value)
-/*[clinic end generated code: output=8689669896d293df input=c25c9d2b4de076b1]*/
+/*[clinic end generated code: output=d285215533b58b28 input=c25c9d2b4de076b1]*/
{
int have_old = 0;
long rc;