Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
61fd0dc0
Commit
61fd0dc0
authored
Jun 05, 2007
by
Walter Dörwald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the name of the C variables match the Python names
for chr()/chr8(). Fix function name in PyArg_ParseTuple() call.
parent
ec4619b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Python/bltinmodule.c
Python/bltinmodule.c
+7
-7
No files found.
Python/bltinmodule.c
View file @
61fd0dc0
...
@@ -365,7 +365,7 @@ PyDoc_STRVAR(filter_doc,
...
@@ -365,7 +365,7 @@ PyDoc_STRVAR(filter_doc,
static
PyObject
*
static
PyObject
*
builtin_chr
(
PyObject
*
self
,
PyObject
*
args
)
builtin_chr
8
(
PyObject
*
self
,
PyObject
*
args
)
{
{
long
x
;
long
x
;
char
s
[
1
];
char
s
[
1
];
...
@@ -381,24 +381,24 @@ builtin_chr(PyObject *self, PyObject *args)
...
@@ -381,24 +381,24 @@ builtin_chr(PyObject *self, PyObject *args)
return
PyString_FromStringAndSize
(
s
,
1
);
return
PyString_FromStringAndSize
(
s
,
1
);
}
}
PyDoc_STRVAR
(
chr_doc
,
PyDoc_STRVAR
(
chr
8
_doc
,
"chr8(i) -> 8-bit character
\n
\
"chr8(i) -> 8-bit character
\n
\
\n
\
\n
\
Return a string of one character with ordinal i; 0 <= i < 256."
);
Return a string of one character with ordinal i; 0 <= i < 256."
);
static
PyObject
*
static
PyObject
*
builtin_
uni
chr
(
PyObject
*
self
,
PyObject
*
args
)
builtin_chr
(
PyObject
*
self
,
PyObject
*
args
)
{
{
long
x
;
long
x
;
if
(
!
PyArg_ParseTuple
(
args
,
"l:
uni
chr"
,
&
x
))
if
(
!
PyArg_ParseTuple
(
args
,
"l:chr"
,
&
x
))
return
NULL
;
return
NULL
;
return
PyUnicode_FromOrdinal
(
x
);
return
PyUnicode_FromOrdinal
(
x
);
}
}
PyDoc_STRVAR
(
uni
chr_doc
,
PyDoc_STRVAR
(
chr_doc
,
"chr(i) -> Unicode character
\n
\
"chr(i) -> Unicode character
\n
\
\n
\
\n
\
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."
);
Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff."
);
...
@@ -1975,8 +1975,8 @@ static PyMethodDef builtin_methods[] = {
...
@@ -1975,8 +1975,8 @@ static PyMethodDef builtin_methods[] = {
{
"abs"
,
builtin_abs
,
METH_O
,
abs_doc
},
{
"abs"
,
builtin_abs
,
METH_O
,
abs_doc
},
{
"all"
,
builtin_all
,
METH_O
,
all_doc
},
{
"all"
,
builtin_all
,
METH_O
,
all_doc
},
{
"any"
,
builtin_any
,
METH_O
,
any_doc
},
{
"any"
,
builtin_any
,
METH_O
,
any_doc
},
{
"chr"
,
builtin_
unichr
,
METH_VARARGS
,
uni
chr_doc
},
{
"chr"
,
builtin_
chr
,
METH_VARARGS
,
chr_doc
},
{
"chr8"
,
builtin_chr
,
METH_VARARGS
,
chr
_doc
},
{
"chr8"
,
builtin_chr
8
,
METH_VARARGS
,
chr8
_doc
},
{
"cmp"
,
builtin_cmp
,
METH_VARARGS
,
cmp_doc
},
{
"cmp"
,
builtin_cmp
,
METH_VARARGS
,
cmp_doc
},
{
"compile"
,
(
PyCFunction
)
builtin_compile
,
METH_VARARGS
|
METH_KEYWORDS
,
compile_doc
},
{
"compile"
,
(
PyCFunction
)
builtin_compile
,
METH_VARARGS
|
METH_KEYWORDS
,
compile_doc
},
{
"delattr"
,
builtin_delattr
,
METH_VARARGS
,
delattr_doc
},
{
"delattr"
,
builtin_delattr
,
METH_VARARGS
,
delattr_doc
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment