Skip to content

Commit

Permalink
Python bindings: fix compatibility issue with SWIG 4.3.0 and PYTHONWA…
Browse files Browse the repository at this point in the history
…RNINGS=error

Fixes conda-forge/gdal-feedstock#995
  • Loading branch information
rouault committed Oct 29, 2024
1 parent 59916e2 commit 4db0954
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions swig/python/modify_cpp_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,8 @@ string(REPLACE "if (--interpreter_counter != 0) // another sub-interpreter may s
"/* 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 )"
_CONTENTS "${_CONTENTS}")

# Works around https://github.com/swig/swig/issues/3061
string(REPLACE "# define SWIG_HEAPTYPES" "// Below is disabled because of https://github.com/swig/swig/issues/3061\n// # define SWIG_HEAPTYPES"
_CONTENTS "${_CONTENTS}")

file(WRITE ${FILE} "${_CONTENTS}")

0 comments on commit 4db0954

Please sign in to comment.