@@ -6192,6 +6192,7 @@ function_get_module(PyObject *self, PyObject *func)
61926192static PyObject * test_buildvalue_issue38913 (PyObject * , PyObject * );
61936193static PyObject * getargs_s_hash_int (PyObject * , PyObject * , PyObject * );
61946194static PyObject * getargs_s_hash_int2 (PyObject * , PyObject * , PyObject * );
6195+ static PyObject * gh_99240_clear_args (PyObject * , PyObject * );
61956196
61966197static PyMethodDef TestMethods [] = {
61976198 {"raise_exception" , raise_exception , METH_VARARGS },
@@ -6308,6 +6309,7 @@ static PyMethodDef TestMethods[] = {
63086309 METH_VARARGS |METH_KEYWORDS },
63096310 {"getargs_s_hash_int2" , _PyCFunction_CAST (getargs_s_hash_int2 ),
63106311 METH_VARARGS |METH_KEYWORDS },
6312+ {"gh_99240_clear_args" , gh_99240_clear_args , METH_VARARGS },
63116313 {"getargs_z" , getargs_z , METH_VARARGS },
63126314 {"getargs_z_star" , getargs_z_star , METH_VARARGS },
63136315 {"getargs_z_hash" , getargs_z_hash , METH_VARARGS },
@@ -8089,3 +8091,21 @@ getargs_s_hash_int2(PyObject *self, PyObject *args, PyObject *kwargs)
80898091 PyBuffer_Release (& buf );
80908092 Py_RETURN_NONE ;
80918093}
8094+
8095+ static PyObject *
8096+ gh_99240_clear_args (PyObject * self , PyObject * args )
8097+ {
8098+ char * a = NULL ;
8099+ char * b = NULL ;
8100+
8101+ if (!PyArg_ParseTuple (args , "eses" , "idna" , & a , "idna" , & b )) {
8102+ if (a || b ) {
8103+ PyErr_Clear ();
8104+ PyErr_SetString (PyExc_AssertionError , "Arguments are not cleared." );
8105+ }
8106+ return NULL ;
8107+ }
8108+ PyMem_Free (a );
8109+ PyMem_Free (b );
8110+ Py_RETURN_NONE ;
8111+ }
0 commit comments