]> git.ipfire.org Git - thirdparty/freeswitch.git/commit
[mod_lua] Move SWIG wrapper patches into ".i" typemaps, drop hack.diff (#3043) master
authorDmitry Verenitsin <morbit85@gmail.com>
Wed, 27 May 2026 22:34:53 +0000 (03:34 +0500)
committerGitHub <noreply@github.com>
Wed, 27 May 2026 22:34:53 +0000 (01:34 +0300)
commit153c3a5139e309321e97c5c6d661ef8c23734477
treeba5caf5bc5a2789c65ef2a82353c04a4bf1bd504
parent077393376a1ae810eeaa49608223cac92dbd7f46
[mod_lua] Move SWIG wrapper patches into ".i" typemaps, drop hack.diff (#3043)

A swig 4.1 regeneration dropped several hand-patched wrapper edits.
Express them (and the rest) as SWIG typemaps in `freeswitch.i` so they
survive reswig. `make reswig` now produces the final wrapper directly;
`hack.diff` and its `patch` step are removed.

Restored regressions:
- `setLUA(L)` on returned `Session`: a hangup hook or input callback on
a script-created `freeswitch.Session()` no longer crashes the process
- binary-safe `Stream::read` (`lua_pushlstring`)

Also moved to typemaps:
- `Dbh`/`JSON` self-pointer guards (`%typemap(check)`), now covering
every wrapper including four the hand-patch missed
- type-table isolation (`#define SWIG_TYPE_TABLE mod_lua`)
src/mod/languages/mod_lua/Makefile.am
src/mod/languages/mod_lua/freeswitch.i
src/mod/languages/mod_lua/hack.diff [deleted file]
src/mod/languages/mod_lua/mod_lua_wrap.cpp