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
7e60192f
Commit
7e60192f
authored
Jul 10, 2017
by
Serhiy Storchaka
Committed by
Victor Stinner
Jul 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove _PyArg_NoStackKeywords(). (#2641)
parent
bb2bae84
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
27 deletions
+2
-27
Include/modsupport.h
Include/modsupport.h
+0
-3
Modules/_hashopenssl.c
Modules/_hashopenssl.c
+2
-6
Python/getargs.c
Python/getargs.c
+0
-18
No files found.
Include/modsupport.h
View file @
7e60192f
...
...
@@ -60,12 +60,9 @@ PyAPI_FUNC(int) _PyArg_UnpackStack(
...);
PyAPI_FUNC
(
int
)
_PyArg_NoKeywords
(
const
char
*
funcname
,
PyObject
*
kwargs
);
PyAPI_FUNC
(
int
)
_PyArg_NoStackKeywords
(
const
char
*
funcname
,
PyObject
*
kwnames
);
PyAPI_FUNC
(
int
)
_PyArg_NoPositional
(
const
char
*
funcname
,
PyObject
*
args
);
#define _PyArg_NoKeywords(funcname, kwargs) \
((kwargs) == NULL || _PyArg_NoKeywords((funcname), (kwargs)))
#define _PyArg_NoStackKeywords(funcname, kwnames) \
((kwnames) == NULL || _PyArg_NoStackKeywords((funcname), (kwnames)))
#define _PyArg_NoPositional(funcname, args) \
((args) == NULL || _PyArg_NoPositional((funcname), (args)))
...
...
Modules/_hashopenssl.c
View file @
7e60192f
...
...
@@ -925,15 +925,11 @@ generate_hash_name_list(void)
*/
#define GEN_CONSTRUCTOR(NAME) \
static PyObject * \
EVP_new_ ## NAME (PyObject *self, PyObject **args, Py_ssize_t nargs
, PyObject *kwnames
) \
EVP_new_ ## NAME (PyObject *self, PyObject **args, Py_ssize_t nargs) \
{ \
PyObject *data_obj = NULL; \
Py_buffer view = { 0 }; \
PyObject *ret_obj; \
\
if (!_PyArg_NoStackKeywords(#NAME, kwnames)) { \
return NULL; \
} \
\
if (!_PyArg_ParseStack(args, nargs, "|O:" #NAME , &data_obj)) { \
return NULL; \
...
...
@@ -967,7 +963,7 @@ generate_hash_name_list(void)
/* a PyMethodDef structure for the constructor */
#define CONSTRUCTOR_METH_DEF(NAME) \
{"openssl_" #NAME, (PyCFunction)EVP_new_ ## NAME, METH_FASTCALL
| METH_KEYWORDS
, \
{"openssl_" #NAME, (PyCFunction)EVP_new_ ## NAME, METH_FASTCALL, \
PyDoc_STR("Returns a " #NAME \
" hash object; optionally initialized with a string") \
}
...
...
Python/getargs.c
View file @
7e60192f
...
...
@@ -2483,7 +2483,6 @@ _PyArg_UnpackStack(PyObject **args, Py_ssize_t nargs, const char *name,
#undef _PyArg_NoKeywords
#undef _PyArg_NoStackKeywords
#undef _PyArg_NoPositional
/* For type constructors that don't take keyword args
...
...
@@ -2511,23 +2510,6 @@ _PyArg_NoKeywords(const char *funcname, PyObject *kwargs)
}
int
_PyArg_NoStackKeywords
(
const
char
*
funcname
,
PyObject
*
kwnames
)
{
if
(
kwnames
==
NULL
)
{
return
1
;
}
assert
(
PyTuple_CheckExact
(
kwnames
));
if
(
PyTuple_GET_SIZE
(
kwnames
)
==
0
)
{
return
1
;
}
PyErr_Format
(
PyExc_TypeError
,
"%.200s() takes no keyword arguments"
,
funcname
);
return
0
;
}
int
_PyArg_NoPositional
(
const
char
*
funcname
,
PyObject
*
args
)
{
...
...
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