This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: py-breakpoint.c fails to compile with MinGW GCC


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]