From 5c4e203bee06873dd28454b828b4ced89c008a35 Mon Sep 17 00:00:00 2001 From: looooo Date: Fri, 23 Jun 2017 16:53:35 +0200 Subject: [PATCH] fix win problem with multiple defined tuple --- src/cpp/foreign_array_wrap.hpp | 8 ++++---- src/cpp/triangle.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cpp/foreign_array_wrap.hpp b/src/cpp/foreign_array_wrap.hpp index 2a9ef4c..32f0cbe 100644 --- a/src/cpp/foreign_array_wrap.hpp +++ b/src/cpp/foreign_array_wrap.hpp @@ -53,7 +53,7 @@ namespace { return object(self.get(idx)); } - static object getitem(FA &self, tuple idx) + static object getitem(FA &self, boost::python::tuple idx) { if (len(idx) != 2) PYTHON_ERROR(IndexError, "expected index tuple of length 2"); @@ -88,7 +88,7 @@ namespace { self.set(idx, extract(value)); } - static void setitem(FA &self, tuple idx, const value_type &v) + static void setitem(FA &self, boost::python::tuple idx, const value_type &v) { if (len(idx) != 2) PYTHON_ERROR(IndexError, "expected index tuple of length 2"); @@ -147,9 +147,9 @@ void exposePODForeignArray(const std::string &name) .add_property("unit", &cl::unit) .add_property("allocated", &cl::is_allocated) .def("__getitem__", (object (*)(cl &, long)) &w_cl::getitem) - .def("__getitem__", (object (*)(cl &, tuple)) &w_cl::getitem) + .def("__getitem__", (object (*)(cl &, boost::python::tuple)) &w_cl::getitem) .def("__setitem__", (void (*)(cl &, long, object)) &w_cl::setitem) - .def("__setitem__", (void (*)(cl &, tuple, const value_type &)) &w_cl::setitem) + .def("__setitem__", (void (*)(cl &, boost::python::tuple, const value_type &)) &w_cl::setitem) .def("deallocate", &cl::deallocate) ; } diff --git a/src/cpp/triangle.c b/src/cpp/triangle.c index 3c88d61..d07556b 100644 --- a/src/cpp/triangle.c +++ b/src/cpp/triangle.c @@ -219,7 +219,7 @@ /* If yours is not a Unix system, define the NO_TIMER compiler switch to */ /* remove the Unix-specific timing code. */ -/* #define NO_TIMER */ +#define NO_TIMER /* To insert lots of self-checks for internal errors, define the SELF_CHECK */ /* symbol. This will slow down the program significantly. It is best to */ -- GitLab