Skip to content

Commit

Permalink
pythongh-104146: Purge CConverter.parse_by_reference from Argument Cl…
Browse files Browse the repository at this point in the history
…inic
  • Loading branch information
erlend-aasland committed May 18, 2024
1 parent 6914297 commit 4218357
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Tools/clinic/libclinic/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##
Expand Down Expand Up @@ -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}")
Expand Down

0 comments on commit 4218357

Please sign in to comment.