From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ep4lFmFvB2pY3D0AWB0awg (envelope-from ) for ; Fri, 15 May 2026 15:09:21 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NZlckVj5; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ocPvyt2j; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NZlckVj5; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ocPvyt2j; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 490EF1E067; Fri, 15 May 2026 15:09:21 -0400 (EDT) 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 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 1D9901E067 for ; Fri, 15 May 2026 15:09:20 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E81E40A00D0 for ; Fri, 15 May 2026 19:09:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E81E40A00D0 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NZlckVj5; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ocPvyt2j; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NZlckVj5; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ocPvyt2j Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id 01E7E40A24A1 for ; Fri, 15 May 2026 19:08:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01E7E40A24A1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 01E7E40A24A1 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778872132; cv=none; b=bEVthroLVafT4zTVMArHoqlEmQaj7d6+Vl5OXtfay7dJFi5+Ku4MVBZz/YbtZvX03+8CNZtsjQyV0B6TYbbo9YNiHi9oAxZtaSPETsrmVehswUkVeSxFFwN/SsiuOphGjDT00byXlSjDBV9M4SfrTkVc0V5arWm2ceBZ7fXDbZ0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778872132; c=relaxed/simple; bh=L8NIN+cMSm13+95xRzzYG0/PKeTdri60D538h2i1P/g=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=foNypIlIUctiY6LPRxZyyMHgndn1jUZP8ziTqMZZo6XZ6w9Yf6ZVglXdQWYInKFAC+GVLSDDGvoKZlRJRPFCwZXVLMb1B37n+pTXI5+y+TVtyVjtKc6K6BpVA8JwS5I4BUambZrsfE81VPvepy78gWN8p6rxFPaIcnKf492/B4Q= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NZlckVj5; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ocPvyt2j; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=NZlckVj5; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=ocPvyt2j DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01E7E40A24A1 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 851995EFD4; Fri, 15 May 2026 19:08:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1778872130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/rgKfoHIIgLTdGfr5DuSHYiBmvCY5sOLaVLk6Thokw=; b=NZlckVj54oZWVrywq48fBykWonnnmy2St31pE8sRsgd0jPoaAlOZ5az98oluyqRUwgH5vb ZadfaLTNvz0QwNcWoJBqDAsFXAVe6NOjBFUu72zM3H3vp8EcUmH9oJumbOx3OU6shsO21p 2b36BFcoa4sZZEVhL3hteB0dx3oFy04= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1778872130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/rgKfoHIIgLTdGfr5DuSHYiBmvCY5sOLaVLk6Thokw=; b=ocPvyt2jiRjs3cKybFx5DP/PVOlmZzml2y3jCQuEt/vvbUKGy2e79g5+cx9cuxx8yhMB0L VAmQNsSnQzJYKtCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1778872130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/rgKfoHIIgLTdGfr5DuSHYiBmvCY5sOLaVLk6Thokw=; b=NZlckVj54oZWVrywq48fBykWonnnmy2St31pE8sRsgd0jPoaAlOZ5az98oluyqRUwgH5vb ZadfaLTNvz0QwNcWoJBqDAsFXAVe6NOjBFUu72zM3H3vp8EcUmH9oJumbOx3OU6shsO21p 2b36BFcoa4sZZEVhL3hteB0dx3oFy04= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1778872130; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=B/rgKfoHIIgLTdGfr5DuSHYiBmvCY5sOLaVLk6Thokw=; b=ocPvyt2jiRjs3cKybFx5DP/PVOlmZzml2y3jCQuEt/vvbUKGy2e79g5+cx9cuxx8yhMB0L VAmQNsSnQzJYKtCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 694B3593A9; Fri, 15 May 2026 19:08:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id Z741GEJvB2ozOQAAD6G6ig (envelope-from ); Fri, 15 May 2026 19:08:50 +0000 Message-ID: Date: Fri, 15 May 2026 21:08:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/5] [gdb/python] Introduce py_{none, true, false, notimplemented} functions To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260515135834.2502165-1-tdevries@suse.de> <87h5o8h8xo.fsf@tromey.com> <33140204-448e-4e6c-97e5-833b589f1732@suse.de> <87zf20frkv.fsf@tromey.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <87zf20frkv.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, suse.de:email, suse.de:mid] 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 5/15/26 8:36 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> On 5/15/26 7:36 PM, Tom Tromey wrote: > Tom> + So for the limited C API 3.12 and newer, we could just return a > Tom> + "PyObject *" instead. > > Tom> I think the sentence is correct, and I still don't understand why you > Tom> think its incorrect. > > It's not incorrect about the implementation of Python, but it posits > that in some situation these functions could return a PyObject*. > > However such a change would not be good. For one thing these things are > useful in places that operate generically on gdbpy_ref<>. But for > another, gdb should treat CPython as a black box to the degree possible > and not try to avoid inc/dec-refs on immortal objects. Whether an > object is immortal is for CPython to manage. OK, understood. I'll push this then with just this comment: ... +/* The following four functions are refcount-safe wrappers around + Py_RETURN_{NONE,TRUE,FALSE,NOTIMPLEMENTED}. */ ... Thanks, - Tom