From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37428 invoked by alias); 1 Jun 2018 12:54:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 37402 invoked by uid 89); 1 Jun 2018 12:54:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=PaulKoningdellcom, sk:paulko, sk:Paul.Ko, sk:paul.ko X-HELO: esa8.dell-outbound.iphmx.com Received: from esa8.dell-outbound.iphmx.com (HELO esa8.dell-outbound.iphmx.com) (68.232.149.218) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 01 Jun 2018 12:54:49 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2FuAABPQRFbmD+a6ERcGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYQXgTUKi3GMZ4FYIZRMgXgLhGwCggYhNBgBAgEBAQEBAQIBAQI?= =?us-ascii?q?QAQEBAQEICwsGKC+CNSKCUwEBAQMBOj8FCwIBCBgeEFcCBA4FgyKBeQioH4hAg?= =?us-ascii?q?WgJAYg0ghOBMwyCXYRzTIJkgiQCmGsHAo5hjRSRF4FBggtwegGCGIIgDgmOF2+?= =?us-ascii?q?PTYEZAQE?= X-IPAS-Result: =?us-ascii?q?A2FuAABPQRFbmD+a6ERcGQEBAQEBAQEBAQEBAQcBAQEBAYQ?= =?us-ascii?q?XgTUKi3GMZ4FYIZRMgXgLhGwCggYhNBgBAgEBAQEBAQIBAQIQAQEBAQEICwsGK?= =?us-ascii?q?C+CNSKCUwEBAQMBOj8FCwIBCBgeEFcCBA4FgyKBeQioH4hAgWgJAYg0ghOBMwy?= =?us-ascii?q?CXYRzTIJkgiQCmGsHAo5hjRSRF4FBggtwegGCGIIgDgmOF2+PTYEZAQE?= Received: from esa3.dell-outbound2.iphmx.com ([68.232.154.63]) by esa8.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 07:54:48 -0500 From: Received: from ausxippc106.us.dell.com ([143.166.85.156]) by esa3.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 18:44:58 +0600 X-LoopCount0: from 10.166.135.75 X-DLP: DLP_GlobalPCIDSS To: CC: , Subject: Re: [PATCH] fix build failure with Python 3.7 Date: Fri, 01 Jun 2018 12:54:00 -0000 Message-ID: <181F555B-4509-4DA2-9D10-4DF4D47D8E3F@dell.com> References: <96198491-96D8-42F0-9956-1C2BC9277050@dell.com> <87fu27fux2.fsf@redhat.com> <2BFDF702-C2E4-4339-ABB4-D0655063DE95@dell.com> <4e99c685-9047-bb84-8ead-ea13d4c202d3@redhat.com> In-Reply-To: <4e99c685-9047-bb84-8ead-ea13d4c202d3@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-ID: <9D3826C7C124CD428149C02B6ADE2F9F@dell.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2018-06/txt/msg00012.txt.bz2 > On Jun 1, 2018, at 8:15 AM, Pedro Alves wrote: >=20 > On 05/31/2018 09:45 PM, Paul.Koning@dell.com wrote: >=20 >>>> @@ -1667,6 +1667,14 @@ finalize_python (void *ignore) >>>> restore_active_ext_lang (previous_active); >>>> } >>>>=20 >>>> +#ifdef IS_PY3K >>>> +PyMODINIT_FUNC >>>> +PyInit__gdb (void) >>>> +{ >>>> + return PyModule_Create (&python_GdbModuleDef); >>>> +} >>>> +#endif >>>=20 >>> I think it's a good idea to add a comment to this function. >>=20 >> I added this (after the #ifdef): >>=20 >> /* This is called via the PyImport_AppendInittab mechanism called >> during initialization, to make the built-in _gdb module known to >> Python. */ >=20 > Can the function be made static? No; I did that first but PyMODINIT_FUNC is a #define that conflicts with "s= tatic". > I'm a little surprised to see the function being named "Py...", since > that kind of looks like stepping in Python's namespace. True. How about "init__gdb_module"? paul