Skip to content

Commit 4218357

Browse files
pythongh-104146: Purge CConverter.parse_by_reference from Argument Clinic
1 parent 6914297 commit 4218357

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Tools/clinic/libclinic/converter.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ class CConverter(metaclass=CConverterAutoRegister):
118118
# the variable when passing it into the _impl function?
119119
impl_by_reference = False
120120

121-
# Should Argument Clinic add a '&' before the name of
122-
# the variable when passing it into PyArg_ParseTuple (AndKeywords)?
123-
parse_by_reference = True
124-
125121
#############################################################
126122
#############################################################
127123
## You shouldn't need to read anything below this point to ##
@@ -328,8 +324,7 @@ def parse_argument(self, args: list[str]) -> None:
328324
elif self.subclass_of:
329325
args.append(self.subclass_of)
330326

331-
s = ("&" if self.parse_by_reference else "") + self.parser_name
332-
args.append(s)
327+
args.append(f"&{self.parser_name}")
333328

334329
if self.length:
335330
args.append(f"&{self.length_name}")

0 commit comments

Comments
 (0)