Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
874015cc
Commit
874015cc
authored
Mar 02, 2010
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: Misc simplifications.
parent
4822a79c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
modules/misc/lua/libs/dialog.c
modules/misc/lua/libs/dialog.c
+3
-5
modules/misc/lua/meta.c
modules/misc/lua/meta.c
+4
-5
No files found.
modules/misc/lua/libs/dialog.c
View file @
874015cc
...
...
@@ -365,8 +365,7 @@ int lua_DialogFlush( lua_State *L )
{
lua_getglobal
(
L
,
"vlc"
);
lua_getfield
(
L
,
-
1
,
"__dialog"
);
extension_dialog_t
*
p_dlg
=
(
extension_dialog_t
*
)
lua_topointer
(
L
,
lua_gettop
(
L
)
);
extension_dialog_t
*
p_dlg
=
(
extension_dialog_t
*
)
lua_topointer
(
L
,
-
1
);
if
(
!
p_dlg
)
return
VLC_SUCCESS
;
...
...
@@ -374,8 +373,7 @@ int lua_DialogFlush( lua_State *L )
int
i_ret
=
VLC_SUCCESS
;
if
(
lua_GetDialogUpdate
(
L
)
)
{
i_ret
=
dialog_ExtensionUpdate
(
vlclua_get_this
(
L
),
p_dlg
);
i_ret
=
dialog_ExtensionUpdate
(
vlclua_get_this
(
L
),
p_dlg
);
lua_SetDialogUpdate
(
L
,
0
);
}
...
...
@@ -759,7 +757,7 @@ static int vlclua_widget_clear( lua_State *L )
if
(
p_widget
->
type
!=
EXTENSION_WIDGET_DROPDOWN
&&
p_widget
->
type
!=
EXTENSION_WIDGET_LIST
)
return
luaL_error
(
L
,
"method
add_value
not valid for this widget"
);
return
luaL_error
(
L
,
"method
clear
not valid for this widget"
);
struct
extension_widget_value_t
*
p_value
,
*
p_next
;
...
...
modules/misc/lua/meta.c
View file @
874015cc
...
...
@@ -138,7 +138,6 @@ static int fetch_art( vlc_object_t *p_this, const char * psz_filename,
void
*
user_data
)
{
input_item_t
*
p_item
=
user_data
;
int
s
;
lua_State
*
L
=
init
(
p_this
,
p_item
,
psz_filename
);
if
(
!
L
)
...
...
@@ -151,13 +150,13 @@ static int fetch_art( vlc_object_t *p_this, const char * psz_filename,
return
i_ret
;
}
if
(
(
s
=
lua_gettop
(
L
)
))
if
(
lua_gettop
(
L
))
{
const
char
*
psz_value
;
if
(
lua_isstring
(
L
,
s
)
)
if
(
lua_isstring
(
L
,
-
1
)
)
{
psz_value
=
lua_tostring
(
L
,
s
);
psz_value
=
lua_tostring
(
L
,
-
1
);
if
(
psz_value
&&
*
psz_value
!=
0
)
{
lua_Dbg
(
p_this
,
"setting arturl: %s"
,
psz_value
);
...
...
@@ -166,7 +165,7 @@ static int fetch_art( vlc_object_t *p_this, const char * psz_filename,
return
VLC_SUCCESS
;
}
}
else
if
(
!
lua_isn
il
(
L
,
s
)
)
else
if
(
!
lua_isn
oneornil
(
L
,
-
1
)
)
{
msg_Err
(
p_this
,
"Lua art fetcher script %s: "
"didn't return a string"
,
psz_filename
);
...
...
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