@@ -5634,6 +5634,7 @@ test_fatal_error(PyObject *self, PyObject *args)
56345634
56355635static PyObject * test_buildvalue_issue38913 (PyObject * , PyObject * );
56365636static PyObject * getargs_s_hash_int (PyObject * , PyObject * , PyObject * );
5637+ static PyObject * getargs_s_hash_int2 (PyObject * , PyObject * , PyObject * );
56375638
56385639static PyMethodDef TestMethods [] = {
56395640 {"raise_exception" , raise_exception , METH_VARARGS },
@@ -5745,6 +5746,8 @@ static PyMethodDef TestMethods[] = {
57455746 {"getargs_s_hash" , getargs_s_hash , METH_VARARGS },
57465747 {"getargs_s_hash_int" , (PyCFunction )(void (* )(void ))getargs_s_hash_int ,
57475748 METH_VARARGS |METH_KEYWORDS },
5749+ {"getargs_s_hash_int2" , (PyCFunction )(void (* )(void ))getargs_s_hash_int2 ,
5750+ METH_VARARGS |METH_KEYWORDS },
57485751 {"getargs_z" , getargs_z , METH_VARARGS },
57495752 {"getargs_z_star" , getargs_z_star , METH_VARARGS },
57505753 {"getargs_z_hash" , getargs_z_hash , METH_VARARGS },
@@ -7435,11 +7438,27 @@ PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
74357438static PyObject *
74367439getargs_s_hash_int (PyObject * self , PyObject * args , PyObject * kwargs )
74377440{
7438- static char * keywords [] = {"" , "x" , NULL };
7441+ static char * keywords [] = {"" , "" , "x" , NULL };
7442+ Py_buffer buf = {NULL };
7443+ const char * s ;
7444+ int len ;
7445+ int i = 0 ;
7446+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "w*|s#i" , keywords , & buf , & s , & len , & i ))
7447+ return NULL ;
7448+ PyBuffer_Release (& buf );
7449+ Py_RETURN_NONE ;
7450+ }
7451+
7452+ static PyObject *
7453+ getargs_s_hash_int2 (PyObject * self , PyObject * args , PyObject * kwargs )
7454+ {
7455+ static char * keywords [] = {"" , "" , "x" , NULL };
7456+ Py_buffer buf = {NULL };
74397457 const char * s ;
74407458 int len ;
74417459 int i = 0 ;
7442- if (!PyArg_ParseTupleAndKeywords (args , kwargs , "|s# i" , keywords , & s , & len , & i ))
7460+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "w*|(s#) i" , keywords , & buf , & s , & len , & i ))
74437461 return NULL ;
7462+ PyBuffer_Release (& buf );
74447463 Py_RETURN_NONE ;
74457464}
0 commit comments