Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b3efd427
Commit
b3efd427
authored
Nov 25, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: remove MD5 functions before someone uses them
parent
f2ec9d3e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
0 additions
and
141 deletions
+0
-141
modules/lua/Modules.am
modules/lua/Modules.am
+0
-1
modules/lua/demux.c
modules/lua/demux.c
+0
-1
modules/lua/extension.c
modules/lua/extension.c
+0
-1
modules/lua/intf.c
modules/lua/intf.c
+0
-1
modules/lua/libs.h
modules/lua/libs.h
+0
-1
modules/lua/libs/md5.c
modules/lua/libs/md5.c
+0
-126
modules/lua/meta.c
modules/lua/meta.c
+0
-1
modules/lua/services_discovery.c
modules/lua/services_discovery.c
+0
-1
share/lua/README.txt
share/lua/README.txt
+0
-8
No files found.
modules/lua/Modules.am
View file @
b3efd427
...
...
@@ -17,7 +17,6 @@ SOURCES_lua = \
libs/httpd.c \
libs/input.c \
libs/input.h \
libs/md5.c \
libs/messages.c \
libs/misc.c \
libs/misc.h \
...
...
modules/lua/demux.c
View file @
b3efd427
...
...
@@ -153,7 +153,6 @@ static int probe_luascript( vlc_object_t *p_this, const char * psz_filename,
luaopen_stream(
L
)
;
luaopen_variables(
L
)
;
luaopen_xml(
L
)
;
luaopen_md
5
(
L
)
;
lua_pushstring(
L,
p_demux->psz_location
)
;
lua_setfield(
L,
-
2
,
"path"
)
;
lua_pushstring(
L,
p_demux->psz_access
)
;
...
...
modules/lua/extension.c
View file @
b3efd427
...
...
@@ -826,7 +826,6 @@ static lua_State* GetLuaState( extensions_manager_t *p_mgr,
luaopen_config(
L
)
;
luaopen_dialog(
L,
p_ext
)
;
luaopen_input(
L
)
;
luaopen_md
5
(
L
)
;
luaopen_msg(
L
)
;
luaopen_net(
L
)
;
luaopen_object(
L
)
;
...
...
modules/lua/intf.c
View file @
b3efd427
...
...
@@ -178,7 +178,6 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
luaopen_volume(
L
)
;
luaopen_gettext(
L
)
;
luaopen_xml(
L
)
;
luaopen_md
5
(
L
)
;
luaopen_equalizer(
L
)
;
/* clean up */
...
...
modules/lua/libs.h
View file @
b3efd427
...
...
@@ -45,7 +45,6 @@ void luaopen_volume( lua_State * );
void
luaopen_gettext
(
lua_State
*
);
void
luaopen_input_item
(
lua_State
*
L
,
input_item_t
*
item
);
void
luaopen_xml
(
lua_State
*
L
);
void
luaopen_md5
(
lua_State
*
L
);
void
luaopen_equalizer
(
lua_State
*
L
);
#endif
modules/lua/libs/md5.c
deleted
100644 → 0
View file @
f2ec9d3e
/*****************************************************************************
* md5.c: md5 hashing functions
*****************************************************************************
* Copyright (C) 2010 Antoine Cellerier
* $Id$
*
* Authors: Antoine Cellerier <dionoea at videolan tod org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_md5.h>
#include <lua.h>
/* Low level lua C API */
#include <lauxlib.h>
/* Higher level C API */
#include "../vlc.h"
#include "../libs.h"
/*****************************************************************************
*
*****************************************************************************/
static
int
vlclua_md5_create
(
lua_State
*
);
static
int
vlclua_md5_add
(
lua_State
*
);
static
int
vlclua_md5_end
(
lua_State
*
);
static
int
vlclua_md5_hash
(
lua_State
*
);
static
const
luaL_Reg
vlclua_md5_reg
[]
=
{
{
"add"
,
vlclua_md
5
_add
}
,
{
"end"
,
vlclua_md
5
_end
}
,
{
"end_"
,
vlclua_md
5
_end
}
,
{
"hash"
,
vlclua_md
5
_hash
}
,
{
NULL,
NULL
}
};
static
int
vlclua_md5_create
(
lua_State
*
L
)
{
if(
lua_gettop(
L
)
)
{
/* If optional first argument is given, and it's a string, just
* return the string's hash */
const
char
*psz_str
=
luaL_checkstring(
L,
1
)
;
struct
md
5
_s
md
5
;
InitMD
5
(
&md
5
)
;
AddMD
5
(
&md
5
,
psz_str,
strlen(
psz_str
)
)
;
EndMD
5
(
&md
5
)
;
char
*psz_hash
=
psz_md
5
_hash(
&md
5
)
;
lua_pushstring(
L,
psz_hash
)
;
free(
psz_hash
)
;
return
1
;
}
struct
md
5
_s
*p_md
5
=
lua_newuserdata(
L,
sizeof(
struct
md
5
_s
)
)
;
InitMD
5
(
p_md
5
)
;
if(
luaL_newmetatable(
L,
"md5"
)
)
{
lua_newtable(
L
)
;
luaL_register(
L,
NULL,
vlclua_md
5
_reg
)
;
lua_setfield(
L,
-
2
,
"__index"
)
;
}
lua_setmetatable(
L,
-
2
)
;
return
1
;
}
static
int
vlclua_md5_add
(
lua_State
*
L
)
{
struct
md
5
_s
*p_md
5
=
(struct
md
5
_s
*)luaL_checkudata(
L,
1
,
"md5"
)
;
if(
!lua_isstring(
L,
2
)
)
luaL_error(
L,
"2nd argument should be a string"
)
;
size_t
i_len
=
0
;
const
char
*psz_str
=
lua_tolstring(
L,
2
,
&i_len
)
;
if(
!psz_str
)
vlclua_error(
L
)
;
AddMD
5
(
p_md
5
,
psz_str,
i_len
)
;
return
0
;
}
static
int
vlclua_md5_end
(
lua_State
*
L
)
{
struct
md
5
_s
*p_md
5
=
(struct
md
5
_s
*)luaL_checkudata(
L,
1
,
"md5"
)
;
EndMD
5
(
p_md
5
)
;
return
0
;
}
static
int
vlclua_md5_hash
(
lua_State
*
L
)
{
struct
md
5
_s
*p_md
5
=
(struct
md
5
_s
*)luaL_checkudata(
L,
1
,
"md5"
)
;
char
*psz_hash
=
psz_md
5
_hash(
p_md
5
)
;
lua_pushstring(
L,
psz_hash
)
;
free(
psz_hash
)
;
return
1
;
}
void
luaopen_md5
(
lua_State
*
L
)
{
lua_pushcfunction(
L,
vlclua_md
5
_create
)
;
lua_setfield(
L,
-
2
,
"md5"
)
;
}
modules/lua/meta.c
View file @
b3efd427
...
...
@@ -72,7 +72,6 @@ static lua_State * init( vlc_object_t *p_this, input_item_t * p_item, const char
luaopen_variables(
L
)
;
luaopen_object(
L
)
;
luaopen_xml(
L
)
;
luaopen_md
5
(
L
)
;
luaopen_input_item(
L,
p_item
)
;
if(
vlclua_add_modules_path(
p_this,
L,
psz_filename
)
)
...
...
modules/lua/services_discovery.c
View file @
b3efd427
...
...
@@ -118,7 +118,6 @@ int Open_LuaSD( vlc_object_t *p_this )
luaopen_stream(
L
)
;
luaopen_gettext(
L
)
;
luaopen_xml(
L
)
;
luaopen_md
5
(
L
)
;
lua_pop(
L,
1
)
;
if(
vlclua_add_modules_path(
p_sd,
L,
p_sys->psz_filename
)
)
...
...
share/lua/README.txt
View file @
b3efd427
...
...
@@ -133,14 +133,6 @@ input.item(): Get the current input item. Input item methods are:
.played_abuffers
.lost_abuffers
MD5
---
md5( str ): return the string's hash
md5(): create an md5 object with the following methods:
:add( str ): add a string to the hash
:end_(): finish hashing
:hash(): return the hash
Messages
--------
msg.dbg( [str1, [str2, [...]]] ): Output debug messages (-vv).
...
...
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