]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Correctly call _string_types function
authorTom Tromey <tromey@adacore.com>
Wed, 4 Oct 2023 14:59:47 +0000 (08:59 -0600)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 13 Nov 2023 15:43:09 +0000 (15:43 +0000)
flake8 points out that the new call to _string_types from
StdExpAnyPrinter.__init__ is not correct -- it needs to be qualified.

libstdc++-v3/ChangeLog:

* python/libstdcxx/v6/printers.py
(StdExpAnyPrinter.__init__): Qualify call to
_string_types.

(cherry picked from commit 4bf77db70e2521dc89f9d7f51c7ae6e58a94b4f9)

libstdc++-v3/python/libstdcxx/v6/printers.py

index 51995b9380638e2384510a7683b50edcb51669a4..ee25253d004001687dd398cb131e0c08e3ec9c69 100644 (file)
@@ -1298,7 +1298,7 @@ class StdExpAnyPrinter(SingleObjContainerPrinter):
             # FIXME need to expand 'std::string' so that gdb.lookup_type works
             if 'std::string' in mgrname:
                 mgrtypes = []
-                for s in _string_types():
+                for s in StdExpAnyPrinter._string_types():
                     try:
                         x = re.sub(r"std::string(?!\w)", s, m.group(1))
                         # The following lookup might raise gdb.error if the