Commit c854652c authored by Rob Jonson's avatar Rob Jonson Committed by Rémi Denis-Courmont

expose make_path to lua

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 1c7bedae
...@@ -91,6 +91,15 @@ static int vlclua_make_uri( lua_State *L ) ...@@ -91,6 +91,15 @@ static int vlclua_make_uri( lua_State *L )
return 1; return 1;
} }
static int vlclua_make_path( lua_State *L )
{
const char *psz_input = luaL_checkstring( L, 1 );
char *psz_path = make_path( psz_input);
lua_pushstring( L, psz_path );
free( psz_path );
return 1;
}
static int vlclua_resolve_xml_special_chars( lua_State *L ) static int vlclua_resolve_xml_special_chars( lua_State *L )
{ {
int i_top = lua_gettop( L ); int i_top = lua_gettop( L );
...@@ -145,6 +154,7 @@ static const luaL_Reg vlclua_strings_reg[] = { ...@@ -145,6 +154,7 @@ static const luaL_Reg vlclua_strings_reg[] = {
{ "decode_uri", vlclua_decode_uri }, { "decode_uri", vlclua_decode_uri },
{ "encode_uri_component", vlclua_encode_uri_component }, { "encode_uri_component", vlclua_encode_uri_component },
{ "make_uri", vlclua_make_uri }, { "make_uri", vlclua_make_uri },
{ "make_path", vlclua_make_path },
{ "resolve_xml_special_chars", vlclua_resolve_xml_special_chars }, { "resolve_xml_special_chars", vlclua_resolve_xml_special_chars },
{ "convert_xml_special_chars", vlclua_convert_xml_special_chars }, { "convert_xml_special_chars", vlclua_convert_xml_special_chars },
{ "from_charset", vlclua_from_charset }, { "from_charset", vlclua_from_charset },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment