From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3290 invoked by alias); 10 May 2011 14:32:12 -0000 Received: (qmail 3275 invoked by uid 22791); 10 May 2011 14:32:10 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 May 2011 14:31:53 +0000 Received: by qwa26 with SMTP id 26so5048180qwa.0 for ; Tue, 10 May 2011 07:31:52 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.67.37 with SMTP id p37mr2711654qci.238.1305037912449; Tue, 10 May 2011 07:31:52 -0700 (PDT) Received: by 10.229.250.66 with HTTP; Tue, 10 May 2011 07:31:52 -0700 (PDT) Reply-To: vanboxem.ruben@gmail.com In-Reply-To: References: Date: Tue, 10 May 2011 14:32:00 -0000 Message-ID: Subject: Re: [PATCH] 64-bit python support From: Ruben Van Boxem To: Tom Tromey Cc: gdb-patches@sourceware.org, mingw64 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 X-SW-Source: 2011-05/txt/msg00245.txt.bz2 2011/5/10 Tom Tromey : >>>>>> "Ruben" =3D=3D Ruben Van Boxem writes: > > Ruben> Attached is a patch that tells gdb-python to use the Py_InitModule= 4_64 > Ruben> function instead of Py_InitModule for 64-bit builds. > > I think this should not be needed. =C2=A0I think the bug must lie somewhe= re > else. =C2=A0I say this because Python's modsupport.h should already do th= is > renaming: > > #if SIZEOF_SIZE_T !=3D SIZEOF_INT > /* On a 64-bit system, rename the Py_InitModule4 so that 2.4 > =C2=A0 modules cannot get loaded into a 2.5 interpreter */ > #define Py_InitModule4 Py_InitModule4_64 > #endif Ah, I didn't know this, that's indeed very handy, but the two occurrences in my patch are actually still a call to Py_InitModule without the "4". Then that probably needs to be patched instead? Ruben > > Tom >