diff --git a/src/cpp/foreign_array.hpp b/src/cpp/foreign_array.hpp index b5b4c49c0fcef29160c4f996e3b88e3fbd34ab3f..31f3b49ded9cb1b4a27d92cd7ea2eb256a14614e 100644 --- a/src/cpp/foreign_array.hpp +++ b/src/cpp/foreign_array.hpp @@ -9,9 +9,7 @@ #include <boost/python.hpp> - - -namespace { +namespace{ class tSizeChangeNotifier; @@ -278,5 +276,4 @@ class tForeignArray : public tReadOnlyForeignArray<ElementT> - #endif diff --git a/src/cpp/foreign_array_wrap.hpp b/src/cpp/foreign_array_wrap.hpp index 32f0cbe3db874592aa64eaae5d1a9db6067cff24..9ef3c5257844959222263a18d91b34f92f340b36 100644 --- a/src/cpp/foreign_array_wrap.hpp +++ b/src/cpp/foreign_array_wrap.hpp @@ -22,8 +22,6 @@ using namespace boost::python; } - - namespace { /* This wrap helper works as long as the value_type is a plain old data (POD) * type. diff --git a/src/cpp/wrap_tetgen.cpp b/src/cpp/wrap_tetgen.cpp index a57468855add3c652585e618c5d7a2aedf82bc64..231f9fdae768e7fca4c8ce7a24987afe75438a4c 100644 --- a/src/cpp/wrap_tetgen.cpp +++ b/src/cpp/wrap_tetgen.cpp @@ -14,7 +14,27 @@ namespace py = boost::python; using namespace std; +namespace boost { +template <> +inline tForeignArray<struct tetgenio::polygon> const volatile * get_pointer(class tForeignArray<struct tetgenio::polygon> const volatile *tF) { + return tF; +} + +template <> +inline tForeignArray<struct tetgenio::facet> const volatile * get_pointer(class tForeignArray<struct tetgenio::facet> const volatile *tF) { + return tF; +} +template <> +inline tForeignArray<int> const volatile * get_pointer(class tForeignArray<int> const volatile *tF) { + return tF; +} + +template <> +inline tForeignArray<double> const volatile * get_pointer(class tForeignArray<double> const volatile *tF) { + return tF; +} +} namespace { diff --git a/src/cpp/wrap_triangle.cpp b/src/cpp/wrap_triangle.cpp index 26b3ef37d65f73067794e7ff2300897bf0b59ae2..6aea449e7599b27fcc57217e02cdd65643792ec3 100644 --- a/src/cpp/wrap_triangle.cpp +++ b/src/cpp/wrap_triangle.cpp @@ -11,6 +11,18 @@ using namespace boost::python; using namespace std; +namespace boost { +template <> +inline tForeignArray<int> const volatile * get_pointer(class tForeignArray<int> const volatile *tF) { + return tF; +} + +template <> +inline tForeignArray<double> const volatile * get_pointer(class tForeignArray<double> const volatile *tF) { + return tF; +} +} + struct tMeshInfo : public triangulateio, public boost::noncopyable