From 4218357d43a85e645c2ce9776510a103efb6ce98 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sat, 18 May 2024 18:01:18 -0400 Subject: [PATCH] gh-104146: Purge CConverter.parse_by_reference from Argument Clinic --- Tools/clinic/libclinic/converter.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Tools/clinic/libclinic/converter.py b/Tools/clinic/libclinic/converter.py index 86853bb4fba253..7f603ea6b8e55a 100644 --- a/Tools/clinic/libclinic/converter.py +++ b/Tools/clinic/libclinic/converter.py @@ -118,10 +118,6 @@ class CConverter(metaclass=CConverterAutoRegister): # the variable when passing it into the _impl function? impl_by_reference = False - # Should Argument Clinic add a '&' before the name of - # the variable when passing it into PyArg_ParseTuple (AndKeywords)? - parse_by_reference = True - ############################################################# ############################################################# ## You shouldn't need to read anything below this point to ## @@ -328,8 +324,7 @@ def parse_argument(self, args: list[str]) -> None: elif self.subclass_of: args.append(self.subclass_of) - s = ("&" if self.parse_by_reference else "") + self.parser_name - args.append(s) + args.append(f"&{self.parser_name}") if self.length: args.append(f"&{self.length_name}")