Skip to content

Commit dde933e

Browse files
committed
Address code review
1 parent 769f6cd commit dde933e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tools/clinic/clinic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ class CLanguage(Language):
871871
""")
872872
GETTERDEF_PROTOTYPE_DEFINE: Final[str] = normalize_snippet(r"""
873873
#define {methoddef_name} \
874-
{{"{name}", {methoddef_cast}{c_basename}{methoddef_cast_end}, NULL, NULL}},
874+
{{"{name}", (getter){c_basename}, NULL, NULL}},
875875
""")
876876
METHODDEF_PROTOTYPE_IFNDEF: Final[str] = normalize_snippet("""
877877
#ifndef {methoddef_name}
@@ -1686,7 +1686,7 @@ def parser_body(
16861686
if flags in ('METH_NOARGS', 'METH_O', 'METH_VARARGS'):
16871687
methoddef_cast = "(PyCFunction)"
16881688
elif f.kind is GETTER:
1689-
methoddef_cast = "(getter)"
1689+
methoddef_cast = "" # This should end up unused
16901690
elif limited_capi:
16911691
methoddef_cast = "(PyCFunction)(void(*)(void))"
16921692
else:

0 commit comments

Comments
 (0)