@@ -6002,6 +6002,7 @@ settrace_to_record(PyObject *self, PyObject *list)
60026002static PyObject * negative_dictoffset (PyObject * , PyObject * );
60036003static PyObject * test_buildvalue_issue38913 (PyObject * , PyObject * );
60046004static PyObject * getargs_s_hash_int (PyObject * , PyObject * , PyObject * );
6005+ static PyObject * getargs_s_hash_int2 (PyObject * , PyObject * , PyObject * );
60056006
60066007static PyMethodDef TestMethods [] = {
60076008 {"raise_exception" , raise_exception , METH_VARARGS },
@@ -6116,6 +6117,8 @@ static PyMethodDef TestMethods[] = {
61166117 {"getargs_s_hash" , getargs_s_hash , METH_VARARGS },
61176118 {"getargs_s_hash_int" , _PyCFunction_CAST (getargs_s_hash_int ),
61186119 METH_VARARGS |METH_KEYWORDS },
6120+ {"getargs_s_hash_int2" , _PyCFunction_CAST (getargs_s_hash_int2 ),
6121+ METH_VARARGS |METH_KEYWORDS },
61196122 {"getargs_z" , getargs_z , METH_VARARGS },
61206123 {"getargs_z_star" , getargs_z_star , METH_VARARGS },
61216124 {"getargs_z_hash" , getargs_z_hash , METH_VARARGS },
@@ -7835,11 +7838,27 @@ PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
78357838static PyObject *
78367839getargs_s_hash_int (PyObject * self , PyObject * args , PyObject * kwargs )
78377840{
7838- static char * keywords [] = {"" , "x" , NULL };
7841+ static char * keywords [] = {"" , "" , "x" , NULL };
7842+ Py_buffer buf = {NULL };
7843+ const char * s ;
7844+ int len ;
7845+ int i = 0 ;
7846+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "w*|s#i" , keywords , & buf , & s , & len , & i ))
7847+ return NULL ;
7848+ PyBuffer_Release (& buf );
7849+ Py_RETURN_NONE ;
7850+ }
7851+
7852+ static PyObject *
7853+ getargs_s_hash_int2 (PyObject * self , PyObject * args , PyObject * kwargs )
7854+ {
7855+ static char * keywords [] = {"" , "" , "x" , NULL };
7856+ Py_buffer buf = {NULL };
78397857 const char * s ;
78407858 int len ;
78417859 int i = 0 ;
7842- if (!PyArg_ParseTupleAndKeywords (args , kwargs , "|s# i" , keywords , & s , & len , & i ))
7860+ if (!PyArg_ParseTupleAndKeywords (args , kwargs , "w*|(s#) i" , keywords , & buf , & s , & len , & i ))
78437861 return NULL ;
7862+ PyBuffer_Release (& buf );
78447863 Py_RETURN_NONE ;
78457864}
0 commit comments