summaryrefslogtreecommitdiff
path: root/src/python/gudhi/hera
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-06-04 17:21:05 +0200
committerMarc Glisse <marc.glisse@inria.fr>2020-06-04 17:21:05 +0200
commitbea81f2d7bc53876a6f071c919663261314965ab (patch)
treeef617017c2f7570bc54f7af431e0223544adea0a /src/python/gudhi/hera
parente84f5d1b3c753147ac1601537b2be15ec118144e (diff)
Use ssize_t from pybind11
Diffstat (limited to 'src/python/gudhi/hera')
-rw-r--r--src/python/gudhi/hera/bottleneck.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/python/gudhi/hera/bottleneck.cc b/src/python/gudhi/hera/bottleneck.cc
index f543613e..846a3525 100644
--- a/src/python/gudhi/hera/bottleneck.cc
+++ b/src/python/gudhi/hera/bottleneck.cc
@@ -8,18 +8,16 @@
* - YYYY/MM Author: Description of the modification
*/
+#include <pybind11_diagram_utils.h>
+
+#ifdef _MSC_VER
// https://github.com/grey-narn/hera/issues/3
// ssize_t is a non-standard type (well, posix)
-// BaseTsd.h provides SSIZE_T on windows, this one should be the same there.
-#ifdef _MSC_VER
-#include <cstddef>
-typedef std::ptrdiff_t ssize_t;
+using py::ssize_t;
#endif
#include <bottleneck.h> // Hera
-#include <pybind11_diagram_utils.h>
-
double bottleneck_distance(Dgm d1, Dgm d2, double delta)
{
// I *think* the call to request() has to be before releasing the GIL.