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
d35df2cf
Commit
d35df2cf
authored
Oct 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: small macro factorization
parent
11ffab8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
modules/lua/libs/net.c
modules/lua/libs/net.c
+9
-9
No files found.
modules/lua/libs/net.c
View file @
d35df2cf
...
...
@@ -514,15 +514,15 @@ void luaopen_net_intf( lua_State *L )
{
lua_newtable
(
L
);
luaL_register
(
L
,
NULL
,
vlclua_net_intf_reg
);
#define ADD_CONSTANT(
name,
value ) \
lua_pushinteger( L, value ); \
lua_setfield( L, -2,
nam
e );
ADD_CONSTANT
(
"POLLIN"
,
POLL
IN
)
ADD_CONSTANT
(
"POLLPRI"
,
POLL
PRI
)
ADD_CONSTANT
(
"POLLOUT"
,
POLL
OUT
)
ADD_CONSTANT
(
"POLLERR"
,
POLL
ERR
)
ADD_CONSTANT
(
"POLLHUP"
,
POLL
HUP
)
ADD_CONSTANT
(
"POLLNVAL"
,
POLL
NVAL
)
#define ADD_CONSTANT( value ) \
lua_pushinteger( L,
POLL##
value ); \
lua_setfield( L, -2,
"POLL"#valu
e );
ADD_CONSTANT
(
IN
)
ADD_CONSTANT
(
PRI
)
ADD_CONSTANT
(
OUT
)
ADD_CONSTANT
(
ERR
)
ADD_CONSTANT
(
HUP
)
ADD_CONSTANT
(
NVAL
)
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