diff options
author | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2024-07-13 20:19:02 +0000 |
---|---|---|
committer | Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2024-07-13 20:19:02 +0000 |
commit | 67dbf4470b2fdf11f0f651dd631f7b1d0bc31e62 (patch) | |
tree | b699772d9c5bed655ccc560571ccbcba8849c228 | |
parent | 2db969b4413e91ca9c4ff0a323184fd618e80dec (diff) | |
download | ports-67dbf4470b2fdf11f0f651dd631f7b1d0bc31e62.tar.gz ports-67dbf4470b2fdf11f0f651dd631f7b1d0bc31e62.zip |
math/py-faiss: Fix build with swig 4.2.0+
PR: 279489
Obtained from: https://github.com/facebookresearch/faiss/commit/d6854136afa3b987defb2c8e8108bad76ebdb949
-rw-r--r-- | math/py-faiss/files/patch-swig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/math/py-faiss/files/patch-swig b/math/py-faiss/files/patch-swig new file mode 100644 index 000000000000..1aa5f58bcbd8 --- /dev/null +++ b/math/py-faiss/files/patch-swig @@ -0,0 +1,21 @@ +Obtained from: https://github.com/facebookresearch/faiss/commit/d6854136afa3b987defb2c8e8108bad76ebdb949 + +--- swigfaiss.swig.orig 2024-02-29 21:24:50 UTC ++++ swigfaiss.swig +@@ -1022,14 +1022,14 @@ PyObject *swig_ptr (PyObject *a) + return SWIG_NewPointerObj(data, SWIGTYPE_p_bool, 0); + } + if(PyArray_TYPE(ao) == NPY_UINT64) { +-#ifdef SWIGWORDSIZE64 ++#if (__SIZEOF_LONG__ == 8) + return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0); + #else + return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long_long, 0); + #endif + } + if(PyArray_TYPE(ao) == NPY_INT64) { +-#ifdef SWIGWORDSIZE64 ++#if (__SIZEOF_LONG__ == 8) + return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0); + #else + return SWIG_NewPointerObj(data, SWIGTYPE_p_long_long, 0); |