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
498262ce
Commit
498262ce
authored
Sep 13, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: remove "bla ? true : false"
parent
e6eb7bbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
modules/misc/lua/libs/acl.c
modules/misc/lua/libs/acl.c
+4
-4
modules/misc/lua/libs/variables.c
modules/misc/lua/libs/variables.c
+2
-2
No files found.
modules/misc/lua/libs/acl.c
View file @
498262ce
/*****************************************************************************
* acl.c: Access list related functions
*****************************************************************************
* Copyright (C) 2007-20
08
the VideoLAN team
* Copyright (C) 2007-20
10
the VideoLAN team
* $Id$
*
* Authors: Antoine Cellerier <dionoea at videolan tod org>
...
...
@@ -64,7 +64,7 @@ static const luaL_Reg vlclua_acl_reg[] = {
static
int
vlclua_acl_create
(
lua_State
*
L
)
{
vlc_object_t
*
p_this
=
vlclua_get_this
(
L
);
bool
b_allow
=
luaL_checkboolean
(
L
,
1
)
?
true
:
false
;
bool
b_allow
=
luaL_checkboolean
(
L
,
1
);
vlc_acl_t
*
p_acl
=
ACL_Create
(
p_this
,
b_allow
);
return
vlclua_acl_create_inner
(
L
,
p_acl
);
}
...
...
@@ -117,7 +117,7 @@ static int vlclua_acl_add_host( lua_State *L )
{
vlc_acl_t
**
pp_acl
=
(
vlc_acl_t
**
)
luaL_checkudata
(
L
,
1
,
"acl"
);
const
char
*
psz_ip
=
luaL_checkstring
(
L
,
2
);
bool
b_allow
=
luaL_checkboolean
(
L
,
3
)
?
true
:
false
;
bool
b_allow
=
luaL_checkboolean
(
L
,
3
);
lua_pushinteger
(
L
,
ACL_AddHost
(
*
pp_acl
,
psz_ip
,
b_allow
)
);
return
1
;
}
...
...
@@ -127,7 +127,7 @@ static int vlclua_acl_add_net( lua_State *L )
vlc_acl_t
**
pp_acl
=
(
vlc_acl_t
**
)
luaL_checkudata
(
L
,
1
,
"acl"
);
const
char
*
psz_ip
=
luaL_checkstring
(
L
,
2
);
int
i_len
=
luaL_checkint
(
L
,
3
);
bool
b_allow
=
luaL_checkboolean
(
L
,
4
)
?
true
:
false
;
bool
b_allow
=
luaL_checkboolean
(
L
,
4
);
lua_pushinteger
(
L
,
ACL_AddNet
(
*
pp_acl
,
psz_ip
,
i_len
,
b_allow
)
);
return
1
;
}
...
...
modules/misc/lua/libs/variables.c
View file @
498262ce
/*****************************************************************************
* variables.c: Generic lua<->vlc variables interface
*****************************************************************************
* Copyright (C) 2007-20
08
the VideoLAN team
* Copyright (C) 2007-20
10
the VideoLAN team
* $Id$
*
* Authors: Antoine Cellerier <dionoea at videolan tod org>
...
...
@@ -257,7 +257,7 @@ int __vlclua_var_toggle_or_set( lua_State *L, vlc_object_t *p_obj,
b_bool
=
!
var_GetBool
(
p_obj
,
psz_name
);
else
/* lua_gettop( L ) == 1 */
{
b_bool
=
luaL_checkboolean
(
L
,
-
1
)
?
true
:
false
;
b_bool
=
luaL_checkboolean
(
L
,
-
1
);
lua_pop
(
L
,
1
);
}
...
...
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