From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 09C053838A2D; Mon, 13 Nov 2023 15:45:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09C053838A2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699890323; bh=grJoOdQP0XcCOuOHkSJHQoFGWgxb4+DmdATA93shVx4=; h=From:To:Subject:Date:From; b=U1+T2XHAg9ILXcIjaN4KQwPMCpXMbp8MCUTCuHnaahstIdz7F0qDCyepdQ1r1M6mk JnhQzNnbNCguT4p6DoQD1TaJvoxbHsq8f05s5FZCtaz0DFBWkdm3cPj5xf/yK/A068 cqh8QNF4vy3Q4NiAPxBtwCm4/7RmU4CD08VnsZ7Q= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-9975] libstdc++: Correctly call _string_types function X-Act-Checkin: gcc X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/releases/gcc-12 X-Git-Oldrev: a530c288c8ea46f3760ca3adb44eaf2d773492d1 X-Git-Newrev: cf5a6d8aa97bc361503ecfb07a5562d8b231eac8 Message-Id: <20231113154523.09C053838A2D@sourceware.org> Date: Mon, 13 Nov 2023 15:45:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:cf5a6d8aa97bc361503ecfb07a5562d8b231eac8 commit r12-9975-gcf5a6d8aa97bc361503ecfb07a5562d8b231eac8 Author: Tom Tromey Date: Wed Oct 4 08:59:47 2023 -0600 libstdc++: Correctly call _string_types function 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) Diff: --- libstdc++-v3/python/libstdcxx/v6/printers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index 51995b93806..ee25253d004 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -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