Ian R. Searle writes:
Sorry for my ignorance. Is the C++ report something put out by the standard committee ?
The C++ Report is a C++ trade rag that has been in circulation for about a decade, give or take. It is not affiliated with the committee, but it has over the yeards, reported on the actions of the committee. An excellent source for C++ trade lore.
Is this something new to the standard, or has this "feature" been there for a while ?
As far as I know, global C++ functions (non member functions) that are not explicitly declared to be extern "C", have never been guaranteed to be compatible with C functions. The impact of this on the Python/C++ integration work, imo, is that we must be able to build extension object method tables without casting to PyCFunction. This probably means implicitly-instantiable per-class templated trampoline machinery. Note, I had decided to not do the "cast to PyCFunction" thing on my first reading of the bstreammodule code. The CPython implementation uses PyCFunctions for two different function signatures--those with keyword args and those without. Clearly you can only get away with shenanigans like that in the unsafe world of C. Any C++ binding will have to regard such function signatures as being of different function pointer types, and strictly conforming C++ compilers will not let you blithely cast between them. -- Geoffrey Furnish Actel Corporation furnish@actel.com Senior Staff Engineer 955 East Arques Ave voice: 408-522-7528 Placement & Routing Sunnyvale, CA 94086-4533 fax: 408-328-2303 "... because only those who write the code truly control the project." -- Jamie Zawinski