8000 gh-132097: remove unnecessary clinic casts to `PyCFunction` and others by picnixz · Pull Request #131665 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-132097: remove unnecessary clinic casts to PyCFunction and others #131665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Prev Previous commit
Next Next commit
update clinic hard-coded tests
  • Loading branch information
picnixz committed Mar 24, 2025
commit 65b14c116a2b7ea0716d8fd18ee8da1ede890629
8 changes: 4 additions & 4 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,11 @@ def test_dest_buffer_not_empty_at_eof(self):
"\\n");

#define FN_METHODDEF \\
{"fn", (PyCFunction)fn, METH_O, fn__doc__},
{"fn", fn, METH_O, fn__doc__},

static PyObject *
fn(PyObject *module, PyObject *a)
/*[clinic end generated code: output=be6798b148ab4e53 input=524ce2e021e4eba6]*/
/*[clinic end generated code: output=9ca52938037af908 input=524ce2e021e4eba6]*/
""")
block = dedent("""
/*[clinic input]
Expand Down Expand Up @@ -2930,11 +2930,11 @@ def test_file_dest(self):
"\\n");

#define FUNC_METHODDEF \\
{"func", (PyCFunction)func, METH_O, func__doc__},
{"func", func, METH_O, func__doc__},

static PyObject *
func(PyObject *module, PyObject *a)
/*[clinic end generated code: output=3dde2d13002165b9 input=a9049054013a1b77]*/
/*[clinic end generated code: output=c710c5cbbd6f0a2f input=a9049054013a1b77]*/
""")
with os_helper.temp_dir() as tmp_dir:
in_fn = os.path.join(tmp_dir, "test.c")
Expand Down
0