Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
11ffab8a
Commit
11ffab8a
authored
Oct 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: separate generic and interface-specific net functions
parent
26989ea2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
7 deletions
+24
-7
modules/lua/extension.c
modules/lua/extension.c
+1
-1
modules/lua/intf.c
modules/lua/intf.c
+1
-1
modules/lua/libs.h
modules/lua/libs.h
+2
-1
modules/lua/libs/net.c
modules/lua/libs/net.c
+20
-4
No files found.
modules/lua/extension.c
View file @
11ffab8a
...
...
@@ -821,7 +821,7 @@ static lua_State* GetLuaState( extensions_manager_t *p_mgr,
luaopen_dialog
(
L
,
p_ext
);
luaopen_input
(
L
);
luaopen_msg
(
L
);
luaopen_net
(
L
);
luaopen_net
_generic
(
L
);
luaopen_object
(
L
);
luaopen_osd
(
L
);
luaopen_playlist
(
L
);
...
...
modules/lua/intf.c
View file @
11ffab8a
...
...
@@ -255,7 +255,7 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
luaopen_input
(
L
);
luaopen_msg
(
L
);
luaopen_misc
(
L
);
luaopen_net
(
L
);
luaopen_net
_intf
(
L
);
luaopen_object
(
L
);
luaopen_osd
(
L
);
luaopen_playlist
(
L
);
...
...
modules/lua/libs.h
View file @
11ffab8a
...
...
@@ -30,7 +30,8 @@ void luaopen_httpd( lua_State * );
void
luaopen_input
(
lua_State
*
);
void
luaopen_msg
(
lua_State
*
);
void
luaopen_misc
(
lua_State
*
);
void
luaopen_net
(
lua_State
*
);
void
luaopen_net_generic
(
lua_State
*
);
void
luaopen_net_intf
(
lua_State
*
);
void
luaopen_object
(
lua_State
*
);
void
luaopen_osd
(
lua_State
*
);
void
luaopen_playlist
(
lua_State
*
);
...
...
modules/lua/libs/net.c
View file @
11ffab8a
...
...
@@ -491,8 +491,7 @@ static int vlclua_opendir( lua_State *L )
/*****************************************************************************
*
*****************************************************************************/
static
const
luaL_Reg
vlclua_net_reg
[]
=
{
{
"url_parse"
,
vlclua_url_parse
},
static
const
luaL_Reg
vlclua_net_intf_reg
[]
=
{
{
"listen_tcp"
,
vlclua_net_listen_tcp
},
{
"connect_tcp"
,
vlclua_net_connect_tcp
},
{
"close"
,
vlclua_net_close
},
...
...
@@ -503,15 +502,18 @@ static const luaL_Reg vlclua_net_reg[] = {
{
"read"
,
vlclua_fd_read
},
{
"write"
,
vlclua_fd_write
},
#endif
/* The following functions do not depend on intf_thread_t and do not really
* belong in net.* but are left here for backward compatibility: */
{
"url_parse"
,
vlclua_url_parse
},
{
"stat"
,
vlclua_stat
},
/* Not really "net" */
{
"opendir"
,
vlclua_opendir
},
/* Not really "net" */
{
NULL
,
NULL
}
};
void
luaopen_net
(
lua_State
*
L
)
void
luaopen_net
_intf
(
lua_State
*
L
)
{
lua_newtable
(
L
);
luaL_register
(
L
,
NULL
,
vlclua_net_reg
);
luaL_register
(
L
,
NULL
,
vlclua_net_
intf_
reg
);
#define ADD_CONSTANT( name, value ) \
lua_pushinteger( L, value ); \
lua_setfield( L, -2, name );
...
...
@@ -523,3 +525,17 @@ void luaopen_net( lua_State *L )
ADD_CONSTANT
(
"POLLNVAL"
,
POLLNVAL
)
lua_setfield
(
L
,
-
2
,
"net"
);
}
static
const
luaL_Reg
vlclua_net_generic_reg
[]
=
{
{
"url_parse"
,
vlclua_url_parse
},
{
"stat"
,
vlclua_stat
},
/* Not really "net" */
{
"opendir"
,
vlclua_opendir
},
/* Not really "net" */
{
NULL
,
NULL
}
};
void
luaopen_net_generic
(
lua_State
*
L
)
{
lua_newtable
(
L
);
luaL_register
(
L
,
NULL
,
vlclua_net_generic_reg
);
lua_setfield
(
L
,
-
2
,
"net"
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment