Skip to content

gh-104146: Purge CConverter.parse_by_reference from Argument Clinic #119162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
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
Loading