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
e816d6a9
Commit
e816d6a9
authored
Apr 03, 2011
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: export make_URI()
parent
2c0a2a2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
modules/lua/libs/strings.c
modules/lua/libs/strings.c
+11
-0
share/lua/README.txt
share/lua/README.txt
+1
-0
No files found.
modules/lua/libs/strings.c
View file @
e816d6a9
...
...
@@ -81,6 +81,16 @@ static int vlclua_encode_uri_component( lua_State *L )
return
i_top
;
}
static
int
vlclua_make_uri
(
lua_State
*
L
)
{
const
char
*
psz_input
=
luaL_checkstring
(
L
,
1
);
const
char
*
psz_scheme
=
luaL_optstring
(
L
,
2
,
NULL
);
char
*
psz_uri
=
make_URI
(
psz_input
,
psz_scheme
);
lua_pushstring
(
L
,
psz_uri
);
free
(
psz_uri
);
return
1
;
}
static
int
vlclua_resolve_xml_special_chars
(
lua_State
*
L
)
{
int
i_top
=
lua_gettop
(
L
);
...
...
@@ -134,6 +144,7 @@ static int vlclua_from_charset( lua_State *L )
static
const
luaL_Reg
vlclua_strings_reg
[]
=
{
{
"decode_uri"
,
vlclua_decode_uri
},
{
"encode_uri_component"
,
vlclua_encode_uri_component
},
{
"make_uri"
,
vlclua_make_uri
},
{
"resolve_xml_special_chars"
,
vlclua_resolve_xml_special_chars
},
{
"convert_xml_special_chars"
,
vlclua_convert_xml_special_chars
},
{
"from_charset"
,
vlclua_from_charset
},
...
...
share/lua/README.txt
View file @
e816d6a9
...
...
@@ -373,6 +373,7 @@ strings.decode_uri( [uri1, [uri2, [...]]] ): Decode a list of URIs. This
function returns as many variables as it had arguments.
strings.encode_uri_component( [uri1, [uri2, [...]]] ): Encode a list of URI
components. This function returns as many variables as it had arguments.
strings.make_uri( path, [scheme] ): Convert a file path to a URI.
strings.resolve_xml_special_chars( [str1, [str2, [...]]] ): Resolve XML
special characters in a list of strings. This function returns as many
variables as it had arguments.
...
...
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