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
8e083895
Commit
8e083895
authored
Jul 02, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: remove unused XML validator
parent
2a8a5de2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
17 deletions
+3
-17
modules/lua/libs/xml.c
modules/lua/libs/xml.c
+3
-17
No files found.
modules/lua/libs/xml.c
View file @
8e083895
...
...
@@ -48,29 +48,15 @@ static const luaL_Reg vlclua_xml_reg[] = {
{
NULL
,
NULL
}
};
static
int
vlclua_xml_delete
(
lua_State
*
L
)
{
xml_t
*
p_xml
=
*
(
xml_t
**
)
luaL_checkudata
(
L
,
1
,
"xml"
);
xml_Delete
(
p_xml
);
return
0
;
}
static
int
vlclua_xml_create
(
lua_State
*
L
)
{
xml_t
*
p_xml
=
xml_Create
(
vlclua_get_this
(
L
)
);
if
(
!
p_xml
)
return
luaL_error
(
L
,
"XML module creation failed."
);
xml_t
**
pp_xml
=
lua_newuserdata
(
L
,
sizeof
(
xml_t
*
)
);
*
pp_xml
=
p_xml
;
lua_newuserdata
(
L
,
0
);
if
(
luaL_newmetatable
(
L
,
"xml"
)
)
{
lua_newtable
(
L
);
luaL_register
(
L
,
NULL
,
vlclua_xml_reg
);
lua_setfield
(
L
,
-
2
,
"__index"
);
lua_pushcfunction
(
L
,
vlclua_xml_delete
);
lua_setfield
(
L
,
-
2
,
"__gc"
);
}
lua_setmetatable
(
L
,
-
2
);
...
...
@@ -98,10 +84,10 @@ static int vlclua_xml_reader_delete( lua_State *L )
static
int
vlclua_xml_create_reader
(
lua_State
*
L
)
{
xml_t
*
p_xml
=
*
(
xml_t
**
)
luaL_checkudata
(
L
,
1
,
"xml"
);
vlc_object_t
*
obj
=
vlclua_get_this
(
L
);
stream_t
*
p_stream
=
*
(
stream_t
**
)
luaL_checkudata
(
L
,
2
,
"stream"
);
xml_reader_t
*
p_reader
=
xml_ReaderCreate
(
p_xml
,
p_stream
);
xml_reader_t
*
p_reader
=
xml_ReaderCreate
(
obj
,
p_stream
);
if
(
!
p_reader
)
return
luaL_error
(
L
,
"XML reader creation failed."
);
...
...
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