py-breakpoint.c fails to compile with MinGW GCC
Tom Tromey
tromey@redhat.com
Thu Jul 28 15:44:00 GMT 2011
Joel> It does compile for me too. Could be a compiler age issue?
I asked Kai and that is what he thinks.
The Python docs don't say much:
We’d like to just assign this to the tp_new slot, but we can’t, for
portability sake, On some platforms or compilers, we can’t statically
initialize a structure member with a function defined in another C
module, so, instead, we’ll assign the tp_new slot in the module
initialization function just before calling PyType_Ready():
See http://docs.python.org/extending/newtypes.html
Joel> Just wondering out loud - if we were to use a C++ compiler, would
Joel> it allow us to use non-static initializers like in this case?
Joel> I'm under the impression that C++ provides elaboration, so
Joel> non-static initialization should be do-able...
That would work; and while I want to do this, I think it is simpler to
just fix the initializations. Or, just require people to use a newer
GCC; 3.4 is 5 years old at this point.
Tom
More information about the Gdb
mailing list