From patchwork Wed Oct 4 15:10:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 148404 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp252086vqb; Wed, 4 Oct 2023 09:23:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzWXt9RaHaHmIovkSZrfdp2SDgS9IXpFpxOwrDCbCCsWevKcikXvgOyW/zhEHoDiBWCMZz X-Received: by 2002:a05:6402:12d8:b0:523:b37e:b83b with SMTP id k24-20020a05640212d800b00523b37eb83bmr119615edx.13.1696436637180; Wed, 04 Oct 2023 09:23:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696436637; cv=none; d=google.com; s=arc-20160816; b=GSVLCqYdwz1YmB+lKoXrY24Glo3PnRnmqsLyqNvpi3TidSWslRLTRyGN+T0UnKmjgM StS23NKvzlr15/yzadh48PllkfKylpXnvnqJ3Fkh/LOyfhuTw9DgydaaKRc2Cz9goX7j ocZpUUcA1LofMqkMgTLn5idDB7XllfrY6Daez3aM6SDqcyPge6FUj+wvRp5Wb2CcOGDi sAOfSoGv7zAJBI9nCEhQ/aSCKRDTGPxOb3yEo4lM4ZaeYcHgsD12in2SgsxWop5AcJAT 5PUxaqocS/peV4TC/wkbDOeji9Wqum3sG0RCim6Fa27CJRvBiPwWjkPmBKAErcjhzSv4 Fm2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dmarc-filter:delivered-to; bh=nSq2f3aUbyS9y+n+FDskNRX6A2iyZoHHFyig81Bb3wE=; fh=Ogh3zaPUNpdNYHofIVNHsbX+D3lwaT1T8Jhe/MolwAA=; b=M1H1IrivTTS3NiOqvoc41JSgEKcgMwKsGDPWgHjzJUUeAUmaTWyD/G3J9+jhakablx znEmVJCvK+j6VrQITojge7AAgqHhLpEwioMzD55vUJNQZqKMC3mgyLvp8gc6+h0MZ81T O2xDtRcgpz3ZRUqkdeEqvkmhNyxYJ5r6qHe+El5QxbikLKHk5QFPQXhPoMt2Bd/bajbF c8HYM4n5J58jEAgQGztYFhHyauRXD0ONRLRvqtQmFvUV0gYgQa+/WcF0HAUFVUnFwPOd Ba0m2xaP6z6ATpuUbtRs8G2phMvT6gxhc99mZvl/q6lRUzonitDQw4ikgvQuM7anbFFi DcBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b="U/1VUc4q"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l20-20020a056402029400b00533d31a98b4si57788edv.242.2023.10.04.09.23.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:23:57 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b="U/1VUc4q"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 241863856DF8 for ; Wed, 4 Oct 2023 15:10:49 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by sourceware.org (Postfix) with ESMTPS id CF09B3858CDB for ; Wed, 4 Oct 2023 15:10:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF09B3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-io1-xd2e.google.com with SMTP id ca18e2360f4ac-79fd60f40ebso31738339f.1 for ; Wed, 04 Oct 2023 08:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1696432215; x=1697037015; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nSq2f3aUbyS9y+n+FDskNRX6A2iyZoHHFyig81Bb3wE=; b=U/1VUc4qFNGry9LiTcL0b38Seuquisnc4Xf3Gpu5Effid3sZ78AsyZNI1fwt5qIWkQ N+ENlazlAI6nULtghinSpZT7Bkrgd2XM3MXqIfDug6bSrS/j252yjBCJoop7ziD4+jPR Mr8X4XWzBdiriOV+DkzPAPgmo1eAabHLSazrMVk8vPrT7hagXUvfFvIRjSFQNLwkG6gq ESXsnX8VuwBda++Y0JZtmuUDBtj7VyZ62oB0lTXhn+xqVgD8ZSDPIyoh//i7o2yPPD2M wt2SILrLp7jojChb47+zr0leQT44HeFqFbs7/hPnJJKJaCQN2Eks27i+ezd2Bx9Ja6C0 9z/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696432215; x=1697037015; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nSq2f3aUbyS9y+n+FDskNRX6A2iyZoHHFyig81Bb3wE=; b=tR8ZHpFS9J4YCchsYXDAhbSwfwHj/oAuHDpVInItIZhftXS/4EswHlheKM30vO+ul7 kd5P3+RpLSPsoQSjUJkB9sIafbIBJ3BVKHJFWjjBAijoOoenkjjlWeG0OJeQoPL2Ygrq ybtQ0xfBO7t2OL1DBx8z9nfTTlCCldKfs2BOsfBZ2MuUCmvZ4cDREqt0f6McAT6ZTFol njoDQHjkBEeqyZHdaeXd/FfCmymR8rLucrPTiUWV+HYlSFbmkK/AQPTSeFUaaVjzlp3u YhfDf7JnXQNAI/YDH442f+AM7XTj3SoFh7FieOVz2KNnJWYnxGEOKH88NJiKV7aGT0mm XaLQ== X-Gm-Message-State: AOJu0YxJf0Oe+ZIaQSpgalF5RUCW5PhRyL/8uXHArIV4TM4ioW9N3ZXp lGeqpPSFFUWlEtX97Z1cyBakpZQkCtl9e2ha/dspkg== X-Received: by 2002:a05:6602:2c4c:b0:79f:e800:ea95 with SMTP id x12-20020a0566022c4c00b0079fe800ea95mr5779853iov.3.1696432214984; Wed, 04 Oct 2023 08:10:14 -0700 (PDT) Received: from localhost.localdomain (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id u23-20020a6be417000000b007870289f4fdsm1000980iog.51.2023.10.04.08.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:10:14 -0700 (PDT) From: Tom Tromey To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Tom Tromey Subject: [PATCH] libstdc++: Correctly call _string_types function Date: Wed, 4 Oct 2023 09:10:05 -0600 Message-Id: <20231004151005.1676194-1-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778842743088719920 X-GMAIL-MSGID: 1778842743088719920 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. --- 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 23efbd171ec..9a51f26d8e0 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -1386,7 +1386,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