From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38098 invoked by alias); 31 May 2018 20:45:56 -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 38079 invoked by uid 89); 31 May 2018 20:45:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1223 X-HELO: esa1.dell-outbound.iphmx.com Received: from esa1.dell-outbound.iphmx.com (HELO esa1.dell-outbound.iphmx.com) (68.232.153.90) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 31 May 2018 20:45:53 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2FKAQCvXhBbh8qZ6ERcGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYQYgTUKmFSBWCGBD1+ScYFkC4RsAoIFITgUAQIBAQEBAQECAQE?= =?us-ascii?q?CEAEBAQoLCQgoL4I1IoJTAQEBAwE6PwULAgEIGB4QVwIEDgWDIoF5CKlfiD+Ba?= =?us-ascii?q?AkBiDeCE4EzDIJdhFsYTIJkgiQChySRRQcCjmGNE5EVgViBdHB6AYIYgiAOCY4?= =?us-ascii?q?Xb443gRkBAQ?= X-IPAS-Result: =?us-ascii?q?A2FKAQCvXhBbh8qZ6ERcGQEBAQEBAQEBAQEBAQcBAQEBAYQ?= =?us-ascii?q?YgTUKmFSBWCGBD1+ScYFkC4RsAoIFITgUAQIBAQEBAQECAQECEAEBAQoLCQgoL?= =?us-ascii?q?4I1IoJTAQEBAwE6PwULAgEIGB4QVwIEDgWDIoF5CKlfiD+BaAkBiDeCE4EzDIJ?= =?us-ascii?q?dhFsYTIJkgiQChySRRQcCjmGNE5EVgViBdHB6AYIYgiAOCY4Xb443gRkBAQ?= Received: from esa2.dell-outbound2.iphmx.com ([68.232.153.202]) by esa1.dell-outbound.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 May 2018 15:43:34 -0500 From: Received: from ausxippc101.us.dell.com ([143.166.85.207]) by esa2.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 02:36:15 +0600 X-LoopCount0: from 10.166.136.211 X-DLP: DLP_GlobalPCIDSS To: CC: Subject: Re: [PATCH] fix build failure with Python 3.7 Date: Thu, 31 May 2018 21:25:00 -0000 Message-ID: <2BFDF702-C2E4-4339-ABB4-D0655063DE95@dell.com> References: <96198491-96D8-42F0-9956-1C2BC9277050@dell.com> <87fu27fux2.fsf@redhat.com> In-Reply-To: <87fu27fux2.fsf@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2018-05/txt/msg00873.txt.bz2 > On May 31, 2018, at 4:10 PM, Sergio Durigan Junior = wrote: >=20 >>=20 >> gdb/ChangeLog: >>=20 >> 2018-05-31 Paul Koning >>=20 >> PR gdb/33470 >=20 > This bug number is actually from Python's bugzilla, not GDB's. So it's > not correct to mention it here in the ChangeLog/commit message. AFAIK, > there's no correspondent GDB bug filed for this issue. Ok, I removed that. >=20 >> * python/python.c (do_start_initialization): >> Avoid call to internal Python API. >> (PyInit__gdb): New function. >>=20 >> diff --git a/gdb/python/python.c b/gdb/python/python.c >> index c29e7d7a6b..89443aee25 100644 >> --- a/gdb/python/python.c >> +++ b/gdb/python/python.c >> @@ -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. I added this (after the #ifdef): /* This is called via the PyImport_AppendInittab mechanism called during initialization, to make the built-in _gdb module known to Python. */ paul