Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions 3 Include/modsupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

Expand Down
8 changes: 2 additions & 6 deletions 8 Modules/_hashopenssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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") \
}
Expand Down
18 changes: 0 additions & 18 deletions 18 Python/getargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
{
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.