summaryrefslogtreecommitdiffstats
path: root/Modules/unicodedata.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-03 20:53:51 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-03 20:53:51 (GMT)
commit1009bf18b38a8d36298575191dd8fdf43f8f9097 (patch)
tree18860fdef30c931dc2ea177059e96b69a49fa04f /Modules/unicodedata.c
parent0759f84d6260bad1234b802212e73fdc5873d261 (diff)
downloadcpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.zip
cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.gz
cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.bz2
Issue #23501: Argumen Clinic now generates code into separate files by default.
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;