Skip to content

Commit

Permalink
Rename private member of FrameDecorator
Browse files Browse the repository at this point in the history
In Python, a member name starting with "__" is specially handled to
make it "more private" to the class -- it isn't truly private, but it
is renamed to make it less likely to be reused by mistake.  This patch
ensures that this is done for the private method of FrameDecorator.
  • Loading branch information
tromey committed Aug 1, 2023
1 parent a18b53a commit f3337b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gdb/python/lib/gdb/FrameDecorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, base):
self._base = base

@staticmethod
def _is_limited_frame(frame):
def __is_limited_frame(frame):
"""Internal utility to determine if the frame is special or
limited."""
sal = frame.find_sal()
Expand Down Expand Up @@ -148,7 +148,7 @@ def frame_args(self):
return self._base.frame_args()

frame = self.inferior_frame()
if self._is_limited_frame(frame):
if self.__is_limited_frame(frame):
return None

args = FrameVars(frame)
Expand All @@ -164,7 +164,7 @@ def frame_locals(self):
return self._base.frame_locals()

frame = self.inferior_frame()
if self._is_limited_frame(frame):
if self.__is_limited_frame(frame):
return None

args = FrameVars(frame)
Expand All @@ -179,7 +179,7 @@ def line(self):
return self._base.line()

frame = self.inferior_frame()
if self._is_limited_frame(frame):
if self.__is_limited_frame(frame):
return None

sal = frame.find_sal()
Expand Down

0 comments on commit f3337b1

Please sign in to comment.