From c04942373c00833fbbeeb018082a08c0e681fea5 Mon Sep 17 00:00:00 2001 From: Marek Wydmuch Date: Mon, 11 Sep 2023 00:08:24 +0200 Subject: [PATCH] Fix compatibly with Windows --- .gitignore | 4 +++- src/lib_python/ViZDoomPythonModule.cpp | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2fd378716..6faa68856 100644 --- a/.gitignore +++ b/.gitignore @@ -95,13 +95,15 @@ src/vizdoom/tools/*/release src/vizdoom/tools/*/*.exe src/vizdoom/tools/lemon/lemon src/vizdoom/tools/re2c/re2c +src/vizdoom/tools/re2c/config.h src/vizdoom/tools/updaterevision/x64/ src/vizdoom/tools/updaterevision/updaterevision -src/vizdoom/tools/zipdir/x64 +src/vizdoom/tools/zipdir/x64/ src/vizdoom/tools/zipdir/zipdir src/vizdoom/wadsrc_wad src/vizdoom/zdoom_docs src/vizdoom/zlib/x64/ +src/vizdoom/zlib/CTestTestfile.cmake # Game wads, scenarios backups, logs, demos and personal configurations *.bak diff --git a/src/lib_python/ViZDoomPythonModule.cpp b/src/lib_python/ViZDoomPythonModule.cpp index c779dcb1d..1e5bb5ea2 100644 --- a/src/lib_python/ViZDoomPythonModule.cpp +++ b/src/lib_python/ViZDoomPythonModule.cpp @@ -53,7 +53,7 @@ PYBIND11_MODULE(vizdoom, vz){ /* Exceptions */ /*----------------------------------------------------------------------------------------------------------------*/ - #define EXCEPTION_TO_PYT(n) pyb::register_exception< n >(vz, #n); + #define EXCEPTION_TO_PYT(n) pyb::register_exception< n >(vz , #n); /* register_exception< ExceptionName >(vz, "ExceptionName"); */ EXCEPTION_TO_PYT(FileDoesNotExistException) @@ -81,13 +81,13 @@ PYBIND11_MODULE(vizdoom, vz){ #define FUNC_2_PYT(n, f) vz.def( n , f , docstrings::f ) /* vz.def("name", function, docstrings::function) */ - #define FUNC_2_PYT_WITH_ARGS(n, f, a...) vz.def( n , f , docstrings::f , a) + #define FUNC_2_PYT_WITH_ARGS(n, f, ...) vz.def( n , f , docstrings::f , __VA_ARGS__ ) /* vz.def("name", function, docstrings::function, args) */ #define CLASS_FUNC_2_PYT(n, cf) .def( n , &cf , docstrings::cf ) /* .def("name", &class::function, docstrings::class::function) */ - #define CLASS_FUNC_2_PYT_WITH_ARGS(n, cf, a...) .def( n , &cf , docstrings::cf, a ) + #define CLASS_FUNC_2_PYT_WITH_ARGS(n, cf, ...) .def( n , &cf , docstrings::cf , __VA_ARGS__ ) /* .def("name", &class::function, docstrings::class::function, args) */