Boost logo

Boost Users :

From: Daniel Boelzle (Daniel.Boelzle_at_[hidden])
Date: 2005-03-09 13:01:51


Hello Peter,

> If you decorate a member function with __cdecl, you are making it
> __cdecl. If you don't decorate it, it will be __thiscall by default,
> regardless of /G?. So I don't think you should use __cdecl here unless
> you really want the "this" pointer pushed on the stack.

I agree, but let me explain the whole story...
I want to enable boost::bind for C++-UNO interfaces. UNO
(http://udk.openoffice.org/) is the component model of OpenOffice.org
and can mediate between different languages, e.g. Python, Java,
generating proxies on the fly.
The generated header files being used for compilation declare pure
virtual __cdecl member functions, thus the this pointer is expected via
stack not ecx. Changing the calling convention to thiscall is really no
option, because it would break binary compatibility with older C++-UNO
components (which can't often be recompiled anyway).

regards,

--Daniel


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net