[Mod] use newer autocxxpy: Register AsyncDispatchException as module_local

[Mod] recompile pyds for xtp, tora and tap
This commit is contained in:
nanoric 2019-06-28 10:56:16 +08:00
parent 7bfbd842bc
commit 86fde178b9
10 changed files with 18 additions and 7 deletions

3
vnpy/api/tap/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
vntap.lib

Binary file not shown.

View File

@ -28,7 +28,8 @@ void init_dispatcher(pybind11::module &m)
{ {
m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler); m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler);
pybind11::class_<autocxxpy::async_dispatch_exception> c(m, "AsyncDispatchException"); // maybe module_local is unnecessary
pybind11::class_<autocxxpy::async_dispatch_exception> c(m, "AsyncDispatchException", pybind11::module_local());
c.def_property_readonly("what", &autocxxpy::async_dispatch_exception::what_mutable); c.def_property_readonly("what", &autocxxpy::async_dispatch_exception::what_mutable);
c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance); c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance);
c.def_readonly("function_name", &autocxxpy::async_dispatch_exception::function_name); c.def_readonly("function_name", &autocxxpy::async_dispatch_exception::function_name);

View File

@ -58,14 +58,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseNativeEnvironment>true</UseNativeEnvironment> <UseNativeEnvironment>true</UseNativeEnvironment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseNativeEnvironment>true</UseNativeEnvironment> <UseNativeEnvironment>true</UseNativeEnvironment>
@ -73,14 +73,14 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseNativeEnvironment>true</UseNativeEnvironment> <UseNativeEnvironment>true</UseNativeEnvironment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset> <PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseNativeEnvironment>true</UseNativeEnvironment> <UseNativeEnvironment>true</UseNativeEnvironment>

3
vnpy/api/tora/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
vntora.lib

Binary file not shown.

View File

@ -27,7 +27,8 @@ void init_dispatcher(pybind11::module &m)
{ {
m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler); m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler);
pybind11::class_<autocxxpy::async_dispatch_exception> c(m, "AsyncDispatchException"); // maybe module_local is unnecessary
pybind11::class_<autocxxpy::async_dispatch_exception> c(m, "AsyncDispatchException", pybind11::module_local());
c.def_property_readonly("what", &autocxxpy::async_dispatch_exception::what_mutable); c.def_property_readonly("what", &autocxxpy::async_dispatch_exception::what_mutable);
c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance); c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance);
c.def_readonly("function_name", &autocxxpy::async_dispatch_exception::function_name); c.def_readonly("function_name", &autocxxpy::async_dispatch_exception::function_name);

2
vnpy/api/xtp/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
vnxtp.lib

Binary file not shown.

View File

@ -25,7 +25,8 @@ void init_dispatcher(pybind11::module &m)
{ {
m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler); m.def("set_async_callback_exception_handler", &autocxxpy::async_callback_exception_handler::set_handler);
pybind11::class_<autocxxpy::async_dispatch_exception> c(m, "AsyncDispatchException"); // maybe module_local is unnecessary
pybind11::class_<autocxxpy::async_dispatch_exception> c(m, "AsyncDispatchException", pybind11::module_local());
c.def_property_readonly("what", &autocxxpy::async_dispatch_exception::what_mutable); c.def_property_readonly("what", &autocxxpy::async_dispatch_exception::what_mutable);
c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance); c.def_readonly("instance", &autocxxpy::async_dispatch_exception::instance);
c.def_readonly("function_name", &autocxxpy::async_dispatch_exception::function_name); c.def_readonly("function_name", &autocxxpy::async_dispatch_exception::function_name);