Repository navigation
obs-scripting: Lua host code behind obs-scripting-lua-host.h (#882) - #1987
Merged
Merged
Conversation
obs-scripting-lua-host.h with stub Windows/macOS/POSIX hosts in per-OS
unity groups; test_obs_scripting_lua_host_{windows,macos,posix} fail
against the stubs.
The package.cpath directories move into obs-scripting-lua-host-{windows,
macos,posix}; the module suffix becomes OBS_LUA_SO_EXT from CMake, the
PATH_MAX buffer and <windows.h> go, and the MSVC pragmas around the SWIG
runtime become /wd options on the Lua groups. The cross check compiles the
Windows and macOS hosts. Baseline: three obs-scripting entries (8) to 0.
On macOS, a bundle without PlugIns no longer adds an uninitialized buffer
to package.cpath.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #882 (slice 1 of 3: Lua). Follows the #1292 pattern.
The Lua C module search path (
package.cpath) is built through a conditional-free host interface,obs-scripting-lua-host.h(obs_lua_host_module_dirs()), implemented inobs-scripting-lua-host-{windows,macos,posix}.c.h, each in its own unity group with its own PCH:./PlugInsfolder (absolute)./, then../SCRIPT_DIRrelative to the executableAlso:
SO_EXTbecomesOBS_LUA_SO_EXT, defined by CMake (dllon Windows,soelsewhere). It's spliced into string literals, so it stays compile-time. ThePATH_MAXbuffer and<windows.h>are gone.#pragma warningblock around the SWIG runtime include inobs-scripting-lua.hbecomes/wd4100 /wd4189 /wd4244 /wd4267on the two Lua unity groups.ci/platform-ifdef-baseline.json: the three Lua entries (8 conditionals) go to 0.cmake/crosscompiles the Windows and macOS host groups.Behavior change (macOS only): when the bundle has no
PlugInsfolder, the old codestrcpy'd nothing and passed an uninitializedimport_pathtopackage.cpath. Now nothing is added.RED (first commit):
test_obs_scripting_lua_host_{windows,macos,posix}(Tier 2,test/cmocka/tests.d/test_obs_scripting_lua_host.cmake; each host file is plain C, so all three run on Linux) fail against empty stub hosts. Local Tier 2: 3 failed out of 400, exactly these.GREEN: all three pass locally.
./lintpasses (ifdef ratchet included),ci/test_cross_sources.pypasses, andcmake/cross/docker.sh win-x64 mac-arm64exits 0.Tiers 1/3/4 do not apply: C build-structure refactor with no Rust or protocol code.