[vlc-commits] Revert "lua: Add a function to convert to the current codepage"

Hugo Beauzée-Luyssen git at videolan.org
Mon Apr 9 17:02:02 CEST 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Apr  6 17:12:32 2018 +0200| [7a6e3c9c3d17329425fdc8c60329489c58ca12bc] | committer: Hugo Beauzée-Luyssen

Revert "lua: Add a function to convert to the current codepage"

This reverts commit fdd3d58eafbe058d64d48b1467693626302004f0.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a6e3c9c3d17329425fdc8c60329489c58ca12bc
---

 modules/lua/libs/strings.c | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/modules/lua/libs/strings.c b/modules/lua/libs/strings.c
index 7709279916..66fb754c8f 100644
--- a/modules/lua/libs/strings.c
+++ b/modules/lua/libs/strings.c
@@ -175,24 +175,6 @@ static int vlclua_from_charset( lua_State *L )
     return 1;
 }
 
-static int vlclua_to_codepage( lua_State *L )
-{
-    if( lua_gettop( L ) < 1 ) return vlclua_error( L );
-
-#ifdef _WIN32
-    const char *psz_input = luaL_checkstring( L, 1 );
-
-    char* psz_output = ToANSI( psz_input );
-    lua_pushstring( L, psz_output ? psz_output : "" );
-    free( psz_output );
-    return 1;
-#else
-    const char *psz_input = luaL_checkstring( L, 1 );
-    lua_pushstring( L, psz_input );
-    return 1;
-#endif
-}
-
 /*****************************************************************************
  *
  *****************************************************************************/
@@ -205,7 +187,6 @@ static const luaL_Reg vlclua_strings_reg[] = {
     { "resolve_xml_special_chars", vlclua_resolve_xml_special_chars },
     { "convert_xml_special_chars", vlclua_convert_xml_special_chars },
     { "from_charset", vlclua_from_charset },
-    { "to_codepage", vlclua_to_codepage },
     { NULL, NULL }
 };
 



More information about the vlc-commits mailing list