generic way to access C++ libs?

Jacek Generowicz jacek.generowicz at cern.ch
Tue Nov 9 03:45:34 EST 2004


"Diez B. Roggisch" <deetsNOSPAM at web.de> writes:

> > But I have no idea how inline definitions of member functions (I'm not
> > sure that's the correct term - I mean code defined in the header files)
> > should be converted to Python code.

Member functions which are _defined_ (as opposed to merely declared)
within the class, are implicitly marked "inline". And the "inline"
keyword is a hint to the compiler that you suggest that the function
be inlined; it's a hind which the compiler is allowed to ignore.

> While inlining is an optimization technique that allows for copying method
> code directly into the callee's code, they will still be exposed
> explicitely as function as otherwise even linking between C++ libs won't
> work.

I don't think so. Given that the _definition_ of the function is in
the header, and the header is needed to compile any code which might
want to link with the library, the compiler has all it needs, without
a need for a corresponding function to exist in the library.



More information about the Python-list mailing list