[C++-sig] exporting __stdcall methods
Nicolas Lelong
nico_ml at mgdesign.org
Tue Aug 16 15:37:37 CEST 2005
Hi Dave,
sorry I linger in responding, I'm only getting back to business after some
holidays :)
> I think it would be great to support these other calling conventions.
glad you see some interest in this too!
> Your patch looks good, but I'm quite surprised that it's so small. Is
> that really all that's required to implement full stdcall/fastcall
> support?
hm, as I did this some time ago already, I took some time to test it a
little more.
I extensively used the patch with stdcall "C" functions, but I investigated
some more by tweaking the "polymorphism" test.
I seems to work all right for regular functions and member functions. I
noticed a "limitation" though : if a pure virtual member function is
exported with a given default implementation, this default implement _must_
the same calling convention as the pure virtual function. I'm not sure that
this is annoying, perhaps this can be corrected : the problem comes from the
'not_a_derived_class_member' call in 'class.hpp' (line 146 in boost 1.33
release) - see attached file 'func_sig_def_impl_fail.cpp'.
I attach the tweaked 'polymorphism' files. I also added the support for
__cdecl member functions, and changed the macros to enable the functionality
to match more closely what is found in type traits lib, so I attach a patch
for signature.hpp (not widely different from the previous one) and
config.hpp.
I'm open to any thoughts or directions you could give me to integrate
properly this patch into BPL.
Cheers,
Nicolas.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_fastcall.py
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_stdcall.cpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0001.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_stdcall.py
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_cdecl.cpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_cdecl.py
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_fastcall.cpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0005.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: polymorphism_func_sig_def_impl_fail.cpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0006.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Jamfile
Type: application/octet-stream
Size: 2574 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.hpp.patch
Type: application/octet-stream
Size: 2729 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.hpp.patch
Type: application/octet-stream
Size: 846 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20050816/b35a989e/attachment-0002.obj>
More information about the Cplusplus-sig
mailing list