Skip to content

Commit 6f132bb

Browse files
committed
Fix: Missing ssize_t on Windows
1 parent e4afcf3 commit 6f132bb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python/lib.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
#include <pybind11/pybind11.h>
2525
#include <pybind11/stl.h>
2626

27+
#if defined(_WIN32) //! On Windows, `ssize_t` is not defined by default
28+
typedef intptr_t ssize_t; //! Use `intptr_t` for a signed integer with the same width as `size_t`
29+
#endif
30+
2731
#include <usearch/index_dense.hpp>
2832
#include <usearch/index_plugins.hpp>
2933

0 commit comments

Comments
 (0)