diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-06-05 20:07:21 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-06-05 20:07:21 (GMT) |
commit | e7efd593900ed3ecc7c5114b6f153013135aac7f (patch) | |
tree | 65514404daeb9bd0b10cc171d3513f897ce09ea8 | |
parent | b41bb7953bce77ec73844523732ac89fd54ec614 (diff) | |
download | cpython-e7efd593900ed3ecc7c5114b6f153013135aac7f.zip cpython-e7efd593900ed3ecc7c5114b6f153013135aac7f.tar.gz cpython-e7efd593900ed3ecc7c5114b6f153013135aac7f.tar.bz2 |
Make the name of the C variables match the Python names
for chr()/chr8(). Fix function name in PyArg_ParseTuple()
call.
-rw-r--r-- | Python/bltinmodule.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 2dc9538..43bbea9 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -365,7 +365,7 @@ PyDoc_STRVAR(filter_doc, static PyObject * -builtin_chr(PyObject *self, PyObject *args) +builtin_chr8(PyObject *self, PyObject *args) { long x; char s[1]; @@ -381,24 +381,24 @@ builtin_chr(PyObject *self, PyObject *args) return PyString_FromStringAndSize(s, 1); } -PyDoc_STRVAR(chr_doc, +PyDoc_STRVAR(chr8_doc, "chr8(i) -> 8-bit character\n\ \n\ Return a string of one character with ordinal i; 0 <= i < 256."); static PyObject * -builtin_unichr(PyObject *self, PyObject *args) +builtin_chr(PyObject *self, PyObject *args) { long x; - if (!PyArg_ParseTuple(args, "l:unichr", &x)) + if (!PyArg_ParseTuple(args, "l:chr", &x)) return NULL; return PyUnicode_FromOrdinal(x); } -PyDoc_STRVAR(unichr_doc, +PyDoc_STRVAR(chr_doc, "chr(i) -> Unicode character\n\ \n\ Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."); @@ -1975,8 +1975,8 @@ static PyMethodDef builtin_methods[] = { {"abs", builtin_abs, METH_O, abs_doc}, {"all", builtin_all, METH_O, all_doc}, {"any", builtin_any, METH_O, any_doc}, - {"chr", builtin_unichr, METH_VARARGS, unichr_doc}, - {"chr8", builtin_chr, METH_VARARGS, chr_doc}, + {"chr", builtin_chr, METH_VARARGS, chr_doc}, + {"chr8", builtin_chr8, METH_VARARGS, chr8_doc}, {"cmp", builtin_cmp, METH_VARARGS, cmp_doc}, {"compile", (PyCFunction)builtin_compile, METH_VARARGS | METH_KEYWORDS, compile_doc}, {"delattr", builtin_delattr, METH_VARARGS, delattr_doc}, |