From 16ad2a7481495e6acb7e0887f54ac02c14238a30 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 21 Nov 2025 13:58:58 -0800 Subject: [PATCH] [lldb] Restore the old behavior in lua-typemaps.swig Restore the original behavior (i.e. before #167764), which uses eOpenOptionWriteOnly, not eOpenOptionReadWrite. Fixes TestLuaAPI.py. --- lldb/bindings/lua/lua-typemaps.swig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/bindings/lua/lua-typemaps.swig b/lldb/bindings/lua/lua-typemaps.swig index a4a77b1a214c9..51a92473c009a 100644 --- a/lldb/bindings/lua/lua-typemaps.swig +++ b/lldb/bindings/lua/lua-typemaps.swig @@ -252,7 +252,7 @@ LLDB_NUMBER_TYPEMAP(enum SWIGTYPE); luaL_Stream *p = (luaL_Stream *)luaL_checkudata(L, $input, LUA_FILEHANDLE); lldb::FileSP file_sp; file_sp = std::make_shared( - p->f, lldb_private::NativeFile::eOpenOptionReadWrite, false); + p->f, lldb_private::NativeFile::eOpenOptionWriteOnly, false); if (!file_sp->IsValid()) return luaL_error(L, "Invalid file"); $1 = file_sp;