aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2013-11-18 09:32:13 -0800
committerLarry Hastings <larry@hastings.org>2013-11-18 09:32:13 -0800
commited4a1c57034d53bf217d64a771208d372ad9e1a5 (patch)
treea5448732832ef3315f33fba2f4b75f79358e4664 /Modules/unicodedata.c
parentIssue #8402: Added the escape() function to the glob module. (diff)
downloadcpython-ed4a1c57034d53bf217d64a771208d372ad9e1a5.tar.gz
cpython-ed4a1c57034d53bf217d64a771208d372ad9e1a5.tar.bz2
cpython-ed4a1c57034d53bf217d64a771208d372ad9e1a5.zip
Argument Clinic: rename "self" to "module" for module-level functions.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r--Modules/unicodedata.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c
index 5097d44020e..62ab957e215 100644
--- a/Modules/unicodedata.c
+++ b/Modules/unicodedata.c
@@ -109,7 +109,8 @@ static Py_UCS4 getuchar(PyUnicodeObject *obj)
/*[clinic]
module unicodedata
-unicodedata.decimal
+class unicodedata.UCD
+unicodedata.UCD.decimal
unichr: object(type='str')
default: object=NULL
@@ -122,23 +123,23 @@ as integer. If no such value is defined, default is returned, or, if
not given, ValueError is raised.
[clinic]*/
-PyDoc_STRVAR(unicodedata_decimal__doc__,
+PyDoc_STRVAR(unicodedata_UCD_decimal__doc__,
"Converts a Unicode character into its equivalent decimal value.\n"
"\n"
-"unicodedata.decimal(unichr, default=None)\n"
+"unicodedata.UCD.decimal(unichr, default=None)\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_DECIMAL_METHODDEF \
- {"decimal", (PyCFunction)unicodedata_decimal, METH_VARARGS, unicodedata_decimal__doc__},
+#define UNICODEDATA_UCD_DECIMAL_METHODDEF \
+ {"decimal", (PyCFunction)unicodedata_UCD_decimal, METH_VARARGS, unicodedata_UCD_decimal__doc__},
static PyObject *
-unicodedata_decimal_impl(PyObject *self, PyObject *unichr, PyObject *default_value);
+unicodedata_UCD_decimal_impl(PyObject *self, PyObject *unichr, PyObject *default_value);
static PyObject *
-unicodedata_decimal(PyObject *self, PyObject *args)
+unicodedata_UCD_decimal(PyObject *self, PyObject *args)
{
PyObject *return_value = NULL;
PyObject *unichr;
@@ -148,15 +149,15 @@ unicodedata_decimal(PyObject *self, PyObject *args)
"O!|O:decimal",
&PyUnicode_Type, &unichr, &default_value))
goto exit;
- return_value = unicodedata_decimal_impl(self, unichr, default_value);
+ return_value = unicodedata_UCD_decimal_impl(self, unichr, default_value);
exit:
return return_value;
}
static PyObject *
-unicodedata_decimal_impl(PyObject *self, PyObject *unichr, PyObject *default_value)
-/*[clinic checksum: 76c8d1c3dbee495d4cfd86ca6829543a3129344a]*/
+unicodedata_UCD_decimal_impl(PyObject *self, PyObject *unichr, PyObject *default_value)
+/*[clinic checksum: a0980c387387287e2ac230c37d95b26f6903e0d2]*/
{
PyUnicodeObject *v = (PyUnicodeObject *)unichr;
int have_old = 0;
@@ -1288,7 +1289,7 @@ unicodedata_lookup(PyObject* self, PyObject* args)
/* XXX Add doc strings. */
static PyMethodDef unicodedata_functions[] = {
- UNICODEDATA_DECIMAL_METHODDEF
+ UNICODEDATA_UCD_DECIMAL_METHODDEF
{"digit", unicodedata_digit, METH_VARARGS, unicodedata_digit__doc__},
{"numeric", unicodedata_numeric, METH_VARARGS, unicodedata_numeric__doc__},
{"category", unicodedata_category, METH_VARARGS,