diff options
Diffstat (limited to 'Modules/clinic/unicodedata.c.h')
-rw-r--r-- | Modules/clinic/unicodedata.c.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Modules/clinic/unicodedata.c.h b/Modules/clinic/unicodedata.c.h new file mode 100644 index 0000000..4934e84 --- /dev/null +++ b/Modules/clinic/unicodedata.c.h @@ -0,0 +1,37 @@ +/*[clinic input] +preserve +[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; +} +/*[clinic end generated code: output=15b82651419cc823 input=a9049054013a1b77]*/ |