Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
c08c1e74
Commit
c08c1e74
authored
Nov 16, 2016
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: remove constant parameter
parent
09a26d40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
modules/lua/libs/variables.c
modules/lua/libs/variables.c
+5
-10
No files found.
modules/lua/libs/variables.c
View file @
c08c1e74
...
...
@@ -42,16 +42,10 @@
/*****************************************************************************
* Variables handling
*****************************************************************************/
static
int
vlclua_pushvalue
(
lua_State
*
L
,
int
i_type
,
vlc_value_t
val
,
bool
b_error_void
)
static
int
vlclua_pushvalue
(
lua_State
*
L
,
int
i_type
,
vlc_value_t
val
)
{
switch
(
i_type
&
VLC_VAR_CLASS
)
{
case
VLC_VAR_VOID
:
if
(
b_error_void
)
vlclua_error
(
L
);
else
lua_pushnil
(
L
);
break
;
case
VLC_VAR_BOOL
:
lua_pushboolean
(
L
,
val
.
b_bool
);
break
;
...
...
@@ -67,6 +61,7 @@ static int vlclua_pushvalue( lua_State *L, int i_type, vlc_value_t val, bool b_e
case
VLC_VAR_ADDRESS
:
vlclua_error
(
L
);
break
;
case
VLC_VAR_VOID
:
default:
vlclua_error
(
L
);
}
...
...
@@ -81,7 +76,7 @@ static int vlclua_pushlist( lua_State *L, vlc_list_t *p_list )
for
(
int
i
=
0
;
i
<
i_count
;
i
++
)
{
lua_pushinteger
(
L
,
i
+
1
);
if
(
!
vlclua_pushvalue
(
L
,
p_list
->
i_type
,
p_list
->
p_values
[
i
]
,
true
)
)
if
(
!
vlclua_pushvalue
(
L
,
p_list
->
i_type
,
p_list
->
p_values
[
i
]
)
)
lua_pushnil
(
L
);
lua_settable
(
L
,
-
3
);
}
...
...
@@ -133,7 +128,7 @@ static int vlclua_var_inherit( lua_State *L )
return
0
;
lua_pop
(
L
,
2
);
return
vlclua_pushvalue
(
L
,
i_type
,
val
,
true
);
return
vlclua_pushvalue
(
L
,
i_type
,
val
);
}
static
int
vlclua_var_get
(
lua_State
*
L
)
...
...
@@ -147,7 +142,7 @@ static int vlclua_var_get( lua_State *L )
return
0
;
lua_pop
(
L
,
2
);
return
vlclua_pushvalue
(
L
,
i_type
,
val
,
true
);
return
vlclua_pushvalue
(
L
,
i_type
,
val
);
}
static
int
vlclua_var_set
(
lua_State
*
L
)
...
...
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