SWIG 4.3 Deprecated t_output_helper and backwards compatibility

"Seth G" <[email protected]> Mon, 17 Jun 2024 18:31:17 +0200
Newsgroups gmane.comp.programming.swig
Message-ID <[email protected]>
Hi all,

We ran into some build issues with the latest SWIG master (4.3.0)  - which removes t_output_helper. 

I've updated the code as suggested in the release notes by using SWIG_Python_AppendOutput. See https://github.com/MapServer/MapServer/pull/7083/files

Is there a way to make this change compatible with both 4.3.0 and previous 4.x SWIG builds?

SWIG_Python_AppendOutput expects a new $is_void parameter in 4.3.0 but won't build in previous versions when added, e.g. SWIG_Python_AppendOutput($result,r,1);

Thanks for any hints,

Seth