@@ -6035,6 +6035,7 @@ test_macros(PyObject *self, PyObject *Py_UNUSED(args))
60356035static PyObject * negative_dictoffset (PyObject * , PyObject * );
60366036static PyObject * test_buildvalue_issue38913 (PyObject * , PyObject * );
60376037static PyObject * getargs_s_hash_int (PyObject * , PyObject * , PyObject * );
6038+ static PyObject * getargs_s_hash_int2 (PyObject * , PyObject * , PyObject * );
60386039
60396040static PyMethodDef TestMethods [] = {
60406041 {"raise_exception" , raise_exception , METH_VARARGS },
@@ -6157,6 +6158,8 @@ static PyMethodDef TestMethods[] = {
61576158 {"getargs_s_hash" , getargs_s_hash , METH_VARARGS },
61586159 {"getargs_s_hash_int" , _PyCFunction_CAST (getargs_s_hash_int ),
61596160 METH_VARARGS |METH_KEYWORDS },
6161+ {"getargs_s_hash_int2" , _PyCFunction_CAST (getargs_s_hash_int2 ),
6162+ METH_VARARGS |METH_KEYWORDS },
61606163 {"getargs_z" , getargs_z , METH_VARARGS },
61616164 {"getargs_z_star" , getargs_z_star , METH_VARARGS },
61626165 {"getargs_z_hash" , getargs_z_hash , METH_VARARGS },
@@ -7794,11 +7797,27 @@ PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
77947797static PyObject *
77957798getargs_s_hash_int (PyObject * self , PyObject * args , PyObject * kwargs )
77967799{
7797- static char * keywords [] = {"" , "x" , NULL };
7800+ static char * keywords [] = {"" , "" , "x" , NULL };
7801+ Py_buffer buf = {NULL };
7802+ const char * s ;
7803+ int len ;
7804+ int i = 0 ;
7805+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "w*|s#i" , keywords , & buf , & s , & len , & i ))
7806+ return NULL ;
7807+ PyBuffer_Release (& buf );
7808+ Py_RETURN_NONE ;
7809+ }
7810+
7811+ static PyObject *
7812+ getargs_s_hash_int2 (PyObject * self , PyObject * args , PyObject * kwargs )
7813+ {
7814+ static char * keywords [] = {"" , "" , "x" , NULL };
7815+ Py_buffer buf = {NULL };
77987816 const char * s ;
77997817 int len ;
78007818 int i = 0 ;
7801- if (!PyArg_ParseTupleAndKeywords (args , kwargs , "|s# i" , keywords , & s , & len , & i ))
7819+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "w*|(s#) i" , keywords , & buf , & s , & len , & i ))
78027820 return NULL ;
7821+ PyBuffer_Release (& buf );
78037822 Py_RETURN_NONE ;
78047823}
0 commit comments