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
d3e62fb6
Commit
d3e62fb6
authored
Jan 05, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PyCFunction_Call(): Combined two switch cases w/ identical bodies.
parent
60a79302
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
Objects/methodobject.c
Objects/methodobject.c
+2
-4
No files found.
Objects/methodobject.c
View file @
d3e62fb6
...
...
@@ -70,6 +70,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
return
(
*
meth
)(
self
,
arg
);
break
;
case
METH_VARARGS
|
METH_KEYWORDS
:
case
METH_OLDARGS
|
METH_KEYWORDS
:
return
(
*
(
PyCFunctionWithKeywords
)
meth
)(
self
,
arg
,
kw
);
case
METH_NOARGS
:
if
(
kw
==
NULL
||
PyDict_Size
(
kw
)
==
0
)
{
...
...
@@ -104,10 +105,7 @@ PyCFunction_Call(PyObject *func, PyObject *arg, PyObject *kw)
return
(
*
meth
)(
self
,
arg
);
}
break
;
case
METH_OLDARGS
|
METH_KEYWORDS
:
return
(
*
(
PyCFunctionWithKeywords
)
meth
)(
self
,
arg
,
kw
);
default:
/* should never get here ??? */
PyErr_BadInternalCall
();
return
NULL
;
}
...
...
@@ -267,7 +265,7 @@ listmethodchain(PyMethodChain *chain)
PyMethodDef
*
ml
;
int
i
,
n
;
PyObject
*
v
;
n
=
0
;
for
(
c
=
chain
;
c
!=
NULL
;
c
=
c
->
link
)
{
for
(
ml
=
c
->
methods
;
ml
->
ml_name
!=
NULL
;
ml
++
)
...
...
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