From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3pMyHwh4D2p9cw0AWB0awg (envelope-from ) for ; Thu, 21 May 2026 17:24:24 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=rzqV2+FO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 6C57C1E024; Thu, 21 May 2026 17:24:24 -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.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,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 F3C5B1E024 for ; Thu, 21 May 2026 17:24:23 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1B7134C91779 for ; Thu, 21 May 2026 21:24:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B7134C91779 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=rzqV2+FO Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 1B45D4C91762 for ; Thu, 21 May 2026 21:23:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B45D4C91762 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1B45D4C91762 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779398639; cv=none; b=qHUftvdNoC1TswAaVatYjXMX0kJ770zRmcyuYCO8aXSx5IH5zjk0NmdWTTBzVf1gFn8LYQwFtW8yj+TOhoVDvKWCEozqxFjRFiGhGhhFdh3THQHuskAR/VSgoT8R9raOZsdReed5tzX1DYvh4ZTONcVkx3/fMTpLJAyxDkfMY+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779398639; c=relaxed/simple; bh=BkL+4KezJZgGrrLuh8hfREYADed0bSF7Iw4rK+glZqo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=eBBWvK4caE89ZMLab0qUSeQ8PAV6COirTk209JZHev14uvL4sxaofvNhe+CnqG56KOo8rfaCfcXPB+lrgmQ7negcqqucPDqN+Dg7txDeaJtT4j8qS6SoP/dAQYnd/yO1i4SwoNS8rE1oiDcCjN7uGC8jiNIRTeo89fFAHyNnnwo= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=rzqV2+FO reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B45D4C91762 Received: from eig-obgw-5004b.ext.cloudfilter.net ([10.0.29.208]) by cmsmtp with ESMTPS id Q8ckwdEXUMFEgQAs2wy5jn; Thu, 21 May 2026 21:23:58 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id QAs0wBYsrnfJUQAs1w6F7Q; Thu, 21 May 2026 21:23:57 +0000 X-Authority-Analysis: v=2.4 cv=KajSsRYD c=1 sm=1 tr=0 ts=6a0f77ed a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=NGcC8JguVDcA:10 a=ItBw4LHWJt0A:10 a=psuBrbKgJgu30w2FbL4A:9 a=ZXulRonScM0A:10 a=zZCYzV9kfG8A:10 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=j8PEgo0OtmdMWZr8fezD1WNUKCzmfoj/zhlZg7H1x9s=; b=rzqV2+FOcYdq9oxjKnsTux9L35 a7QB8Fv5TdYj/sPFKT5iOCWgxM2o+XmX8VL1ydDTM8mvwpl1hJP57RBgfGSntQPiGpm2tAoK9VyxW FWlRL8JI2L8UWXDYuBcM87uRc; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:33120 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wQAs0-00000000lOS-1mOx; Thu, 21 May 2026 15:23:56 -0600 From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 3/4] Add wrappers for Python implementation functions and methods In-Reply-To: <877bp1cb9f.fsf@redhat.com> (Andrew Burgess's message of "Mon, 18 May 2026 10:33:48 +0100") References: <20260515-python-safety-initial-v2-0-6129cadf258a@tromey.com> <20260515-python-safety-initial-v2-3-6129cadf258a@tromey.com> <877bp1cb9f.fsf@redhat.com> X-Attribution: Tom Date: Thu, 21 May 2026 15:23:55 -0600 Message-ID: <877bowjw2c.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wQAs0-00000000lOS-1mOx X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (prentzel) [75.166.225.82]:33120 X-Source-Auth: tom+tromey.com X-Email-Count: 8 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfPkVvKFglQFBO6wUqiKPOT64ArxKExTIjlkeXYq0xgbssAhBIkD6HSpwGnFY+DYUSDBo8KwUMhUz9pR/Mhptf31GzCawxcD8C3Fwmlpw/WvYGFoBK1iS 9Ds5tnFW5Jr7i52A9h3UsYFzTpBdggnopgK4pyTrN64EE5S5mOaofaUSuVKXRW6v7ZJN9XC8DY2TNGP3va7FWb5rbg5KjIHLVmY= 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 >> +noargs_method (std::string_view name, std::string_view doc) Andrew> Using std::string_view seems a little suspect here. Yeah. I think some earlier attempt at this required string_view, but I've changed it to 'const char *' and it's fine. >> +/* A function that wraps a "repr" or "str" method. */ >> +template >> +PyObject * >> +wrap_repr (PyObject *arg) Andrew> Maybe something like 'wrap_tp_callback' might be better? I just know Andrew> every time I see 'wrap_repr' for something that isn't 'repr' I'm going Andrew> to assume copy & paste error, and then have to go and remind myself that Andrew> 'wrap_repr' has wider uses. Now's a great time to find a better name Andrew> before this starts getting used more widely.. I changed it to wrap_tp_callback. Tom