From patchwork Tue Oct 3 17:18:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 1842765 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=KebqDoEG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0PhM0rbBz1yng for ; Wed, 4 Oct 2023 04:19:47 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EED2E3865C21 for ; Tue, 3 Oct 2023 17:19:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id E3F493858408 for ; Tue, 3 Oct 2023 17:19:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3F493858408 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-il1-x129.google.com with SMTP id e9e14a558f8ab-3528bc102adso4209605ab.2 for ; Tue, 03 Oct 2023 10:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1696353541; x=1696958341; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=boOmGV/6TjOLuBhywtJCzQe4ZAPokQuL6+bf0WcCb/k=; b=KebqDoEGIrtPHaeZEpTJGlhBmR0dR2iwpCh4PukpO8PgVaA7QyQFGBgNMl0J5rqbkq Mb40GkjQ8KL+f1VJtoE3uElg7Q2CYd286lA3IbpGyZoAWn9gifmhp6cLqxUgSbz/sRMe QqrROcYS6O3bpo63yoMRxiLty5titUVu26RbhmQbBmB29DC9NlTojGnzAlLdxHC6DYHc gYFkS12j52ploEAH28I6SNnMQmSJ0Amu8QN3FluqU6YeABmzbXSBWnG/URM80+tZQsHf +/V0NSAtlPAQulHPiNIjaPy4gyqx6+7NxhAdUVT1xeYrx3AXHJ0erZ4tDAFG23Q8YrDx s0qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696353541; x=1696958341; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=boOmGV/6TjOLuBhywtJCzQe4ZAPokQuL6+bf0WcCb/k=; b=X1GN8pN5vyBlAdD09LzYIk7zbA8OQJPJ517Ji0uTIjzVLWiT5qhxc9hQZJYiECJQpv ugpejgd2dg7a9UZwok8BucNIvzxOXmqLN0cAvtmhIKQv1pzQ6gcT+TBp62dEpLgAnaFT K2Cg7nhhGSFKMr+gX1N+Q7m0yq2eMOL/uszGJCeVC1rdWDKAsqpW2x66gP1R3IKXIe0U DJRzm/kGUoPn47wsjeub4vqzdP1la80uVcv5Lgm5JbRgShSD7NyiKqA4zzKBstxIb+rr gkBHAWXMDSYWkrtGiryAeYxxsfd4LuDtLqPf8qU5Cs+tbPbokilU1MzQ8jvJqZ62r1D9 zwxw== X-Gm-Message-State: AOJu0YyCwIHhQPMXsPW5Q9MrHM6F8lQpN4jkgn9jn8lWcpFQhoRGSRKb yOfWFPygVrYpVz0otVkPveyjeJKyMjj7twISfHvtmA== X-Google-Smtp-Source: AGHT+IE0s+w++o/bHkjL8oiWTPK7F0GqJMc1Bl3xQa8BK7lkM40FzT19LpFpPD7J6mbdW0fS5y4dzw== X-Received: by 2002:a05:6e02:12e3:b0:350:f442:9a4d with SMTP id l3-20020a056e0212e300b00350f4429a4dmr86082iln.28.1696353541187; Tue, 03 Oct 2023 10:19:01 -0700 (PDT) Received: from localhost.localdomain (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id p7-20020a92c607000000b0035134215863sm480967ilm.55.2023.10.03.10.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 10:19:00 -0700 (PDT) From: Tom Tromey To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Tom Tromey Subject: [PATCH 1/2] libstdc++: Define _versioned_namespace in xmethods.py Date: Tue, 3 Oct 2023 11:18:50 -0600 Message-Id: <20231003171851.1161340-2-tromey@adacore.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231003171851.1161340-1-tromey@adacore.com> References: <20231003171851.1161340-1-tromey@adacore.com> 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=unavailable 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+incoming=patchwork.ozlabs.org@gcc.gnu.org flake8 pointed out that is_specialization_of in xmethods.py looks at a global that wasn't added to the file. This patch correct the oversight. libstdc++-v3/ChangeLog: * python/libstdcxx/v6/xmethods.py (_versioned_namespace): Define. --- libstdc++-v3/python/libstdcxx/v6/xmethods.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libstdc++-v3/python/libstdcxx/v6/xmethods.py b/libstdc++-v3/python/libstdcxx/v6/xmethods.py index 844c8a2105a..8ccf57c4d6b 100644 --- a/libstdc++-v3/python/libstdcxx/v6/xmethods.py +++ b/libstdc++-v3/python/libstdcxx/v6/xmethods.py @@ -28,6 +28,8 @@ def get_bool_type(): def get_std_size_type(): return gdb.lookup_type('std::size_t') +_versioned_namespace = '__8::' + def is_specialization_of(x, template_name): """ Test whether a type is a specialization of the named class template.