mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-111178: Change Argument Clinic signature for @classmethod
(#131157)
Use "PyObject*", instead of "PyTypeObject*", for `@classmethod` functions to fix an undefined behavior.
This commit is contained in:
parent
de2f7da77d
commit
061da44bac
22 changed files with 164 additions and 62 deletions
|
@ -2494,8 +2494,8 @@ Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.
|
|||
[clinic start generated code]*/
|
||||
|
||||
static PyObject *
|
||||
bytes_fromhex(PyTypeObject *type, PyObject *string)
|
||||
/*[clinic end generated code: output=d458ec88195da6b3 input=f37d98ed51088a21]*/
|
||||
bytes_fromhex_impl(PyTypeObject *type, PyObject *string)
|
||||
/*[clinic end generated code: output=0973acc63661bb2e input=f37d98ed51088a21]*/
|
||||
{
|
||||
PyObject *result = _PyBytes_FromHex(string, 0);
|
||||
if (type != &PyBytes_Type && result != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue