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
0456df4a
Commit
0456df4a
authored
Jun 17, 2019
by
Jeroen Demeyer
Committed by
Inada Naoki
Jun 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37231: remove _PyObject_FastCall_Prepend (GH-14153)
parent
c034b782
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
42 deletions
+0
-42
Include/cpython/abstract.h
Include/cpython/abstract.h
+0
-6
Objects/call.c
Objects/call.c
+0
-36
No files found.
Include/cpython/abstract.h
View file @
0456df4a
...
...
@@ -156,12 +156,6 @@ PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend(
PyObject
*
args
,
PyObject
*
kwargs
);
PyAPI_FUNC
(
PyObject
*
)
_PyObject_FastCall_Prepend
(
PyObject
*
callable
,
PyObject
*
obj
,
PyObject
*
const
*
args
,
Py_ssize_t
nargs
);
/* Like PyObject_CallMethod(), but expect a _Py_Identifier*
as the method name. */
PyAPI_FUNC
(
PyObject
*
)
_PyObject_CallMethodId
(
PyObject
*
obj
,
...
...
Objects/call.c
View file @
0456df4a
...
...
@@ -837,42 +837,6 @@ PyObject_CallObject(PyObject *callable, PyObject *args)
}
/* Positional arguments are obj followed by args:
call callable(obj, *args, **kwargs) */
PyObject
*
_PyObject_FastCall_Prepend
(
PyObject
*
callable
,
PyObject
*
obj
,
PyObject
*
const
*
args
,
Py_ssize_t
nargs
)
{
PyObject
*
small_stack
[
_PY_FASTCALL_SMALL_STACK
];
PyObject
**
args2
;
PyObject
*
result
;
nargs
++
;
if
(
nargs
<=
(
Py_ssize_t
)
Py_ARRAY_LENGTH
(
small_stack
))
{
args2
=
small_stack
;
}
else
{
args2
=
PyMem_Malloc
(
nargs
*
sizeof
(
PyObject
*
));
if
(
args2
==
NULL
)
{
PyErr_NoMemory
();
return
NULL
;
}
}
/* use borrowed references */
args2
[
0
]
=
obj
;
if
(
nargs
>
1
)
{
memcpy
(
&
args2
[
1
],
args
,
(
nargs
-
1
)
*
sizeof
(
PyObject
*
));
}
result
=
_PyObject_FastCall
(
callable
,
args2
,
nargs
);
if
(
args2
!=
small_stack
)
{
PyMem_Free
(
args2
);
}
return
result
;
}
/* Call callable(obj, *args, **kwargs). */
PyObject
*
_PyObject_Call_Prepend
(
PyObject
*
callable
,
...
...
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