summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-21 13:44:21 +0200
committerwm4 <wm4@nowhere>2014-10-21 13:44:21 +0200
commitbd315dfaf9c6fc08daaeff2478a43cea668c3dee (patch)
treea438135e6fa7ae9f90da4778f95d51aa6d8014a6
parentbc1893e0369388cbc0b2023cb06a98e4449783d7 (diff)
downloadmpv-bd315dfaf9c6fc08daaeff2478a43cea668c3dee.tar.bz2
mpv-bd315dfaf9c6fc08daaeff2478a43cea668c3dee.tar.xz
lua: don't use "output" as identifier
I suspect this clashes with libcs,w hich define "stdout" as macro. Hopefully fixes #1206.
-rw-r--r--player/lua.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/lua.c b/player/lua.c
index 39a911ea35..cfb7cc22fc 100644
--- a/player/lua.c
+++ b/player/lua.c
@@ -1206,7 +1206,7 @@ static int script_subprocess(lua_State *L)
posix_spawn_file_actions_t fa;
bool fa_destroy = false;
- bstr stdout = {0};
+ bstr output = {0};
int status = -1;
int pipes[2] = {-1, -1};
pid_t pid = -1;
@@ -1247,12 +1247,12 @@ static int script_subprocess(lua_State *L)
if (r < 0 && errno == EINTR)
continue;
if (r > 0)
- bstr_xappend(tmp, &stdout, (bstr){buf, r});
+ bstr_xappend(tmp, &output, (bstr){buf, r});
eof = r == 0;
if (r <= 0)
break;
}
- if (stdout.len >= max_size)
+ if (output.len >= max_size)
break;
}
@@ -1286,7 +1286,7 @@ done:
}
lua_pushinteger(L, status); // res s
lua_setfield(L, -2, "status"); // res
- lua_pushlstring(L, stdout.start, stdout.len); // res d
+ lua_pushlstring(L, output.start, output.len); // res d
lua_setfield(L, -2, "stdout"); // res
return 1;
}