From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id P3FyCoT5nGl/7gcAWB0awg (envelope-from ) for ; Mon, 23 Feb 2026 20:06:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1771895172; bh=zzc0gl091QrpcqqSQFbMmBmkjYDiR7TpIm3BeGpZ+hc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vumysilfzJPoOLo/YrYd+hWPES8k2uympy53gygIu88K2xu7FX4/LJfvd+0p0G/dY ygOWN/sdIvkZFV670fxQIW+3Kf9JuoDnIWNQWn6w+lJwuGAyPmyO9oxdfzh6kwB4BV drRNYOU0rsYRA9UmM7RiKxSoSxL/VlUpGY7K3uI4= Received: by simark.ca (Postfix, from userid 112) id 11ECD1E0BA; Mon, 23 Feb 2026 20:06:12 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=Q6S9+ruH; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E7FF51E08D for ; Mon, 23 Feb 2026 20:06:10 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 669F14BA2E09 for ; Tue, 24 Feb 2026 01:06:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 669F14BA2E09 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=Q6S9+ruH Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 400424BA2E09 for ; Tue, 24 Feb 2026 01:05:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 400424BA2E09 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 400424BA2E09 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771895145; cv=none; b=dif9o4OZPdiplj3KcP9rj8CTge2ttmJlyyT8BKsqHE+dXxOQ+9eEcpDXe+ARuA5+GcObgTB63qz+B+HIkovGoxTSFKFQ/IYko95W1rYGct2COcXRExT4dq3trHIt7uVna73q8ZHgDQbwLzl6hm8cHEIEWW9/5m8LSq6kq3oQl58= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1771895145; c=relaxed/simple; bh=zzc0gl091QrpcqqSQFbMmBmkjYDiR7TpIm3BeGpZ+hc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uUmrzV1w87KNj/CLwqTafkSKWhcabpSscW9eUOZfQtKswg519/wpWozzN306ajeSE9w/NEiBqnIqUCzs3cawxgzIQYzhnzIjZaxrYRFujcfe8SyFhIlBJiLwTmuOdQGQuO6WHgfEWhBpBnq8RrAiy3Coj2xEqSuYR8U0a2SduGI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 400424BA2E09 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1771895143; bh=zzc0gl091QrpcqqSQFbMmBmkjYDiR7TpIm3BeGpZ+hc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Q6S9+ruHKpP3csril+6ZPZaQ87FOsl7wJQASljOKwSaGwwolkqgXCyvyIgQXdHipa vJEprkSd7g2xGfx5rN1W0OUfVsLqsSenl2g9wm/kYPojGr+AFhPEJajXev15O183Eh Hpr4InIzEaNYHR7M4cncfFZYabveZmtkSFgHN9h4= Received: by simark.ca (Postfix) id 51CA81E08D; Mon, 23 Feb 2026 20:05:43 -0500 (EST) Message-ID: <14087536-5ab7-48f7-a10f-30cf0a016254@simark.ca> Date: Mon, 23 Feb 2026 20:05:42 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 0/4] Better Python safety To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260222200759.1587070-1-tom@tromey.com> <87y0kjqc2n.fsf@tromey.com> <87tsv7qaj2.fsf@tromey.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <87tsv7qaj2.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 2026-02-23 18:56, Tom Tromey wrote: > Tom> Initially I made gdbpy_borrowed_ref reject NULL pointers, but Python > Tom> will pass NULL as the keyword argument to varargs methods. But I think > Tom> a separate class can be done. > > I implemented this. > > gdbpy_optional_ref is used for keyword arguments and also by setters. > Not sure if it will see any other uses. Is this kind of ref also borrowed? If so I would include "borrowed" in its name, otherwise it's confusing. Perhaps gdbpy_opt_borrowed_ref? Or flip the naming around, make the "default" borrowed and find a name for the "strong" refs. Simon