Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-104146: Purge CConverter.parse_by_reference from Argument Clinic
  • Loading branch information
erlend-aasland committed May 18, 2024
commit 4218357d43a85e645c2ce9776510a103efb6ce98
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