[C++-sig] exporting __stdcall methods
Mike
mike at thewilsonfamily.freeserve.co.uk
Sun Mar 13 00:18:45 CET 2005
Here's my quick fix, but as I couldn't make it work for member functions I
can't be sure its right (but it does compile & run my simple test case).
In python/signature.hpp, add the following just after the first definition
of the template function
get_signature
Its an exact copy of the first get_signature function , except for the
"__stdcall" addition.
template <
class RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class T)>
inline BOOST_PYTHON_LIST_INC(N)<
RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)>
get_signature(RT(__stdcall * )(BOOST_PP_ENUM_PARAMS_Z(1, N, T)), void* = 0)
{
return BOOST_PYTHON_LIST_INC(N)<
RT BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, T)
>();
}
I tried in a similar vain for the 2 member functions variants that appear
later in the same file.
However, I had no success, hence the reason for my caution.
Regards,
Mike
----- Original Message -----
From: "Leonard "paniq" Ritter" <paniq at paniq.org>
To: "Development of Python/C++ integration" <c++-sig at python.org>
Sent: Saturday, March 12, 2005 8:12 PM
Subject: [C++-sig] exporting __stdcall methods
> i'm currently running into an issue with exporting interface methods
> that have been declared as __stdcall.
>
> i found two mails relating to that issue,
>
> http://mail.python.org/pipermail/c++-sig/2005-February/008556.html
>
> and
>
> http://mail.python.org/pipermail/c++-sig/2003-April/003811.html
>
> has a solution been found for this yet?
>
> is there a standard solution for that problem? i have no chance of
> changing the calling convention.
>
> best regards,
> leonard
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
More information about the Cplusplus-sig
mailing list