On 18-mrt-2006, at 10:28, M.-A. Lemburg wrote: > Ronald Oussoren wrote: >> On 17-mrt-2006, at 22:14, M.-A. Lemburg wrote: >> >>> Martin v. Löwis wrote: >>>> Thomas Heller wrote: >>>>> I'm not sure if this is what Marc-Andre means, but maybe these >>>>> definitions >>>>> could go into a new include file: >>>> How would that include file be used? You would have to copy it >>>> into your >>>> own source base, and include it, right? >>> We could put it into a b/w compatibility header file, e.g. >>> >>> #include "pycompat.h" >> >> But wouldn't this header be needed on versions of python before 2.5? > > Yes. Ideally it should work on more Python versions than just > Python 2.5. > > I have such a compatibility header file for the mx Extensions > (called mxpyapi.h and included in egenix-mx-base). > > It includes #defines such as the one Thomas proposed for > Python back to version 1.5. > >> That >> would make inclusion of a pycompat.h header with python 2.5 less >> useful. > > Why is that ? For older versions you can copy it into your > extension's include directory. With the usual #ifdef PYCOMPAT_H > wrapper this won't get included if Python already includes > the header file via #include "Python.h".
The actual contents of the file would be useful, but having a header file should be copied into your own projects seems odd to me. I'd expect information like this to be in the documentation (either the size_t PEP or the extending & embedding document). Ronald _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com