Skip to content
Snippets Groups Projects
Verified Commit 67dbf447 authored by sunpoet's avatar sunpoet
Browse files

math/py-faiss: Fix build with swig 4.2.0+

parent 2db969b4
No related branches found
No related tags found
No related merge requests found
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);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment