[Patches] [ python-Patches-1448488 ] const PyDict_Type ?

SourceForge.net noreply at sourceforge.net
Sun Mar 12 22:53:23 CET 2006


Patches item #1448488, was opened at 2006-03-12 21:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1448488&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Zooko O'Whielacronx (zooko)
Assigned to: Nobody/Anonymous (nobody)
Summary: const PyDict_Type ?

Initial Comment:
When I try to compile SVN trunk, plus my recent
declspecs-for-ssize_t patch, I get this error from
Cygwin gcc 3.4.4:

building 'collections' extension
gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -I.
-I/cygdrive/c/playground/python/trunk/./Include
-I./Include -I.
-I/cygdrive/c/playground/python/trunk/Include
 -I/cygdrive/c/playground/python/trunk -c
/cygdrive/c/playground/python/trunk/Modules/collectionsmodule.c
-o build/temp.cygwin-1.5.19-i686-2.5/collectionsmodule.o
/cygdrive/c/playground/python/trunk/Modules/collectionsmodule.c:1314:
error: initializer element is not constant
/cygdrive/c/playground/python/trunk/Modules/collectionsmodule.c:1314:
error: (near initialization for `defdict_type.tp_base')


This is with this version of gcc:

$ gcc --version
gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd
0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying
conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.


So, with much uncertainty, I applied the attached patch
that makes PyDict_Type be const.  The whole thing then
compiles fine (if you disregard one million warnings
about discarding qualifiers from pointer target type),
but the resulting python.exe segfaults on startup.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1448488&group_id=5470


More information about the Patches mailing list