Skip to content

Commit 4db0954

Browse files
committed
Python bindings: fix compatibility issue with SWIG 4.3.0 and PYTHONWARNINGS=error
Fixes conda-forge/gdal-feedstock#995
1 parent 59916e2 commit 4db0954

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

swig/python/modify_cpp_files.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,8 @@ string(REPLACE "if (--interpreter_counter != 0) // another sub-interpreter may s
6666
"/* Even Rouault / GDAL hack for SWIG >= 4.1 related to objects not being freed. See swig/python/modify_cpp_files.cmake for more details */\nif( 1 )"
6767
_CONTENTS "${_CONTENTS}")
6868

69+
# Works around https://github.com/swig/swig/issues/3061
70+
string(REPLACE "# define SWIG_HEAPTYPES" "// Below is disabled because of https://github.com/swig/swig/issues/3061\n// # define SWIG_HEAPTYPES"
71+
_CONTENTS "${_CONTENTS}")
72+
6973
file(WRITE ${FILE} "${_CONTENTS}")

0 commit comments

Comments
 (0)