@@ -1817,15 +1817,12 @@ to the format string S.format. See help(struct) for more on format\n\
18171817strings." );
18181818
18191819static PyObject *
1820- s_pack (PyObject * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
1820+ s_pack (PyObject * self , PyObject * * args , Py_ssize_t nargs )
18211821{
18221822 PyStructObject * soself ;
18231823 PyObject * result ;
18241824
18251825 /* Validate arguments. */
1826- if (!_PyArg_NoStackKeywords ("pack" , kwnames )) {
1827- return NULL ;
1828- }
18291826 soself = (PyStructObject * )self ;
18301827 assert (PyStruct_Check (self ));
18311828 assert (soself -> s_codes != NULL );
@@ -1859,16 +1856,13 @@ offset. Note that the offset is a required argument. See\n\
18591856help(struct) for more on format strings." );
18601857
18611858static PyObject *
1862- s_pack_into (PyObject * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
1859+ s_pack_into (PyObject * self , PyObject * * args , Py_ssize_t nargs )
18631860{
18641861 PyStructObject * soself ;
18651862 Py_buffer buffer ;
18661863 Py_ssize_t offset ;
18671864
18681865 /* Validate arguments. +1 is for the first arg as buffer. */
1869- if (!_PyArg_NoStackKeywords ("pack_into" , kwnames )) {
1870- return NULL ;
1871- }
18721866 soself = (PyStructObject * )self ;
18731867 assert (PyStruct_Check (self ));
18741868 assert (soself -> s_codes != NULL );
@@ -2126,15 +2120,11 @@ Return a bytes object containing the values v1, v2, ... packed according\n\
21262120to the format string. See help(struct) for more on format strings." );
21272121
21282122static PyObject *
2129- pack (PyObject * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
2123+ pack (PyObject * self , PyObject * * args , Py_ssize_t nargs )
21302124{
21312125 PyObject * s_object = NULL ;
21322126 PyObject * format , * result ;
21332127
2134- if (!_PyArg_NoStackKeywords ("pack" , kwnames )) {
2135- return NULL ;
2136- }
2137-
21382128 if (nargs == 0 ) {
21392129 PyErr_SetString (PyExc_TypeError , "missing format argument" );
21402130 return NULL ;
@@ -2144,7 +2134,7 @@ pack(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
21442134 if (!cache_struct_converter (format , & s_object )) {
21452135 return NULL ;
21462136 }
2147- result = s_pack (s_object , args + 1 , nargs - 1 , kwnames );
2137+ result = s_pack (s_object , args + 1 , nargs - 1 );
21482138 Py_DECREF (s_object );
21492139 return result ;
21502140}
@@ -2158,15 +2148,11 @@ that the offset is a required argument. See help(struct) for more\n\
21582148on format strings." );
21592149
21602150static PyObject *
2161- pack_into (PyObject * self , PyObject * * args , Py_ssize_t nargs , PyObject * kwnames )
2151+ pack_into (PyObject * self , PyObject * * args , Py_ssize_t nargs )
21622152{
21632153 PyObject * s_object = NULL ;
21642154 PyObject * format , * result ;
21652155
2166- if (!_PyArg_NoStackKeywords ("pack_into" , kwnames )) {
2167- return NULL ;
2168- }
2169-
21702156 if (nargs == 0 ) {
21712157 PyErr_SetString (PyExc_TypeError , "missing format argument" );
21722158 return NULL ;
@@ -2176,7 +2162,7 @@ pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
21762162 if (!cache_struct_converter (format , & s_object )) {
21772163 return NULL ;
21782164 }
2179- result = s_pack_into (s_object , args + 1 , nargs - 1 , kwnames );
2165+ result = s_pack_into (s_object , args + 1 , nargs - 1 );
21802166 Py_DECREF (s_object );
21812167 return result ;
21822168}
0 commit comments