Repository navigation
Description
Part of #847.
Lua/Python scripting host: shared library extension, Python runtime link mode, macOS framework paths, MSVC warning pragmas.
Class totals: (a) movable 21, (b) stays - public header 0, (c) Rust-ported 0. Total: 21. Line numbers on origin/master.
| file:line | macro | branch | class | proposed function / target |
|---|---|---|---|---|
shared/obs-scripting/obs-scripting-lua.c:33 |
__APPLE__ |
SO_EXT "so" on macOS | a | obs-scripting-platform.h (SO_EXT, PATH_MAX) with -windows/-cocoa/-nix variants |
shared/obs-scripting/obs-scripting-lua.c:35 |
elif _WIN32 |
include windows.h, SO_EXT "dll" | a | same |
shared/obs-scripting/obs-scripting-lua.c:1327 |
_WIN32 |
PATH_MAX = MAX_PATH | a | same header |
shared/obs-scripting/obs-scripting-lua.c:1334 |
__APPLE__ |
macOS bundle path add to package.cpath | a | obs_lua_platform_add_cpaths(dstr*) in obs-scripting-cocoa.m |
shared/obs-scripting/obs-scripting-lua.c:1353 |
!_WIN32 && !__APPLE__ |
relative ../SCRIPT_DIR cpath on nix | a | same, in obs-scripting-nix.c |
shared/obs-scripting/obs-scripting-lua.h:26 |
_MSC_VER |
pragma warning push | a | CMake /wd for target in the Windows cmake file |
shared/obs-scripting/obs-scripting-lua.h:37 |
_MSC_VER |
pragma warning pop | a | same |
shared/obs-scripting/obs-scripting-python-import.c:24 |
_MSC_VER |
disable warning 4152 | a | CMake /wd |
shared/obs-scripting/obs-scripting-python-import.c:28 |
_WIN32 |
windows/io includes, F_OK, library name patterns | a | obs-scripting-python-import-windows.c |
shared/obs-scripting/obs-scripting-python-import.c:36 |
elif __APPLE__ |
macOS dylib FILE_PATTERN | a | obs-scripting-python-import-cocoa.m |
shared/obs-scripting/obs-scripting-python-import.h:22 |
`_WIN32 | APPLE` | RUNTIME_LINK=1 (dlopen python) vs link | |
shared/obs-scripting/obs-scripting-python-import.h:29 |
_MSC_VER |
pragma push 4115 | a | CMake /wd |
shared/obs-scripting/obs-scripting-python-import.h:34 |
_WIN32 && _DEBUG |
undef _DEBUG around Python.h | a | Windows-only header |
shared/obs-scripting/obs-scripting-python-import.h:42 |
_MSC_VER |
pragma pop | a | CMake /wd |
shared/obs-scripting/obs-scripting-python.c:1617 |
__APPLE__ |
macOS Python.framework home path | a | obs_python_platform_home() in cocoa file |
shared/obs-scripting/obs-scripting-python.c:1660 |
__APPLE__ |
dont_write_bytecode for app bundle | a | obs_python_platform_init() |
shared/obs-scripting/obs-scripting-python.c:1680 |
__APPLE__ |
plugin/resource sys.path from bundle | a | same |
shared/obs-scripting/obs-scripting-python.h:24 |
_MSC_VER |
pragma push | a | CMake /wd |
shared/obs-scripting/obs-scripting-python.h:36 |
_MSC_VER |
pragma pop | a | CMake /wd |
shared/obs-scripting/obs-scripting-python.h:45 |
_WIN32 |
func alias vs include dlfcn.h | a | obs-scripting-python-link.h |
shared/obs-scripting/obs-scripting.c:162 |
!_WIN32 && !__APPLE__ |
auto-load system Python on nix | a | obs_scripting_platform_autoload_python() |
Classes: (a) movable behind per-platform files; (b) public-header ABI/export/type selection, stays; (c) already replaced by the Rust port (platform code isolated in src/platform/). Macro column abbreviates the #if expression; ! means negated, elif means an #elif line.
Test approach: Add Tier 2 Linux load-a-Lua-script smoke test and a characterization test of the cpath/python-path builders; macOS/Windows via native builds (ci-full).
Each move is one function per facade entry, mechanical, so upstream merges stay manageable; the ratchet baseline (step 1) drops by the moved count.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Oct 23, 2026
Claiming: #882, one PR per slice, following the #1292 (frontend-tools) pattern: a conditional-free
*-host.hinterface,*-host-{windows,macos,posix}implementations in per-OS unity groups, a cmocka RED test against stub hosts, and cross-check coverage.obs-scripting-lua.c.h,obs-scripting-lua.pch.h), plus the MSVC pragmas inobs-scripting-lua.h.obs-scripting-python-import.{h,c.h}and its PCH).obs-scripting-python.{c.h,h}), and theobs-scripting.c.hPython path check.The first PR (RED) goes up today.
obs-scripting: Lua host code behind obs-scripting-lua-host.h (#882)
obs-scripting: Lua host code behind obs-scripting-lua-host.h (obs-rus…
obs-scripting: RED test for the Python import host interface (#882)
obs-scripting: Python import host code behind obs-scripting-python-im…
obs-scripting: RED test for the Python host interface (#882)
obs-scripting: Python host code behind obs-scripting-python-host.h (#882
obs-scripting: Python import host code behind obs-scripting-python-im…
obs-scripting: RED test for the Python host interface (#882)
obs-scripting: Python host code behind obs-scripting-python-host.h (#882
obs-scripting: RED test for the Python host interface (#882)
obs-scripting: Python host code behind obs-scripting-python-host.h (#882
obs-scripting: Python host code behind obs-scripting-python-host.h (o…
zackees commentedon Oct 24, 2026
Done in three slices, each following the #1292 host-interface pattern with Tier 2 host tests and cross-check coverage:
obs-scripting-lua-host.h;OBS_LUA_SO_EXTfrom CMake)obs-scripting-python-import-host.h;RUNTIME_LINKfrom CMake,hosts/<os>/obs-scripting-python-include.h)obs-scripting-python-host.h), plus theobs-scripting.c.hload-at-start checkshared/obs-scriptinghas no entries left inci/platform-ifdef-baseline.json. Behavior changes: macOS no longer adds an uninitialized buffer to Lua'spackage.cpathwhen the bundle lacks PlugIns, and Windows Python lookup accepts non-ASCII install paths.