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
7046783c
Commit
7046783c
authored
Nov 02, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua_variables: implement var_IncInteger and var_DecInteger
parent
2a2f464b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
modules/misc/lua/libs/variables.c
modules/misc/lua/libs/variables.c
+22
-0
No files found.
modules/misc/lua/libs/variables.c
View file @
7046783c
...
...
@@ -542,6 +542,26 @@ static int vlclua_trigger_callback( lua_State *L )
return
vlclua_push_ret
(
L
,
var_TriggerCallback
(
*
pp_obj
,
psz_var
)
);
}
static
int
vlclua_inc_integer
(
lua_State
*
L
)
{
vlc_object_t
**
pp_obj
=
luaL_checkudata
(
L
,
1
,
"vlc_object"
);
const
char
*
psz_var
=
luaL_checkstring
(
L
,
2
);
int64_t
i_val
=
var_IncInteger
(
*
pp_obj
,
psz_var
);
lua_pushinteger
(
L
,
i_val
);
return
1
;
}
static
int
vlclua_dec_integer
(
lua_State
*
L
)
{
vlc_object_t
**
pp_obj
=
luaL_checkudata
(
L
,
1
,
"vlc_object"
);
const
char
*
psz_var
=
luaL_checkstring
(
L
,
2
);
int64_t
i_val
=
var_DecInteger
(
*
pp_obj
,
psz_var
);
lua_pushinteger
(
L
,
i_val
);
return
1
;
}
/*****************************************************************************
*
*****************************************************************************/
...
...
@@ -555,6 +575,8 @@ static const luaL_Reg vlclua_var_reg[] = {
{
"trigger_callback"
,
vlclua_trigger_callback
},
{
"command"
,
vlclua_command
},
{
"libvlc_command"
,
vlclua_libvlc_command
},
{
"inc_integer"
,
vlclua_inc_integer
},
{
"dec_integer"
,
vlclua_dec_integer
},
{
NULL
,
NULL
}
};
...
...
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