[vlc-commits] Lua: do not allocate useless pipe on Win32
Rémi Denis-Courmont
git at videolan.org
Sun Jul 7 19:27:57 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 7 20:27:29 2013 +0300| [decf8e46e9b2efcf26ea6a991feb43702eeea462] | committer: Rémi Denis-Courmont
Lua: do not allocate useless pipe on Win32
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=decf8e46e9b2efcf26ea6a991feb43702eeea462
---
modules/lua/intf.c | 4 ++++
modules/lua/vlc.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/modules/lua/intf.c b/modules/lua/intf.c
index 03c6cef..d8eab71 100644
--- a/modules/lua/intf.c
+++ b/modules/lua/intf.c
@@ -362,11 +362,15 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
p_sys->L = L;
+#ifndef _WIN32
if( vlc_pipe( p_sys->fd ) )
{
lua_close( p_sys->L );
goto error;
}
+#else
+# define close(fd) (void)0
+#endif
if( vlc_clone( &p_sys->thread, Run, p_intf, VLC_THREAD_PRIORITY_LOW ) )
{
diff --git a/modules/lua/vlc.h b/modules/lua/vlc.h
index 5da864b..9ea05cf 100644
--- a/modules/lua/vlc.h
+++ b/modules/lua/vlc.h
@@ -158,7 +158,9 @@ struct intf_sys_t
{
char *psz_filename;
lua_State *L;
+#ifndef _WIN32
int fd[2];
+#endif
vlc_thread_t thread;
};
More information about the vlc-commits
mailing list