mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-16 18:03:37 +02:00
CLuaInstance: Add linux pthread support
- code ported from lua-llthreads2
(https://github.com/moteus/lua-llthreads2)
- code in neutrino integrated for use of lua neutrino api in threads
- add thread::cancel() function
- Set Lua api version to 1.34
Origin commit data
------------------
Commit: ee73678d8f
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-12-22 (Tue, 22 Dec 2015)
Origin message was:
------------------
CLuaInstance: Add linux pthread support
- code ported from lua-llthreads2
(https://github.com/moteus/lua-llthreads2)
- code in neutrino integrated for use of lua neutrino api in threads
- add thread::cancel() function
- Set Lua api version to 1.34
This commit is contained in:
@@ -31,14 +31,14 @@ extern "C" {
|
||||
#include "luainstance_helpers.h"
|
||||
|
||||
#define LUA_API_VERSION_MAJOR 1
|
||||
#define LUA_API_VERSION_MINOR 33
|
||||
#define LUA_API_VERSION_MINOR 34
|
||||
|
||||
void LuaInstRegisterFunctions(lua_State *L, bool fromThreads=false);
|
||||
|
||||
/* inspired by Steve Kemp http://www.steve.org.uk/ */
|
||||
class CLuaInstance
|
||||
{
|
||||
static const char className[];
|
||||
static const luaL_Reg methods[];
|
||||
static const luaL_Reg menu_methods[];
|
||||
static CLuaData *CheckData(lua_State *L, int narg);
|
||||
public:
|
||||
CLuaInstance();
|
||||
@@ -58,10 +58,6 @@ public:
|
||||
// The last parameter to NULL is imperative.
|
||||
void runScript(const char *fileName, const char *arg0, ...);
|
||||
|
||||
private:
|
||||
lua_State* lua;
|
||||
void registerFunctions();
|
||||
|
||||
static int NewWindow(lua_State *L);
|
||||
static int GCWindow(lua_State *L);
|
||||
static int GetInput(lua_State *L);
|
||||
@@ -80,6 +76,10 @@ private:
|
||||
static int saveScreen(lua_State *L);
|
||||
static int restoreScreen(lua_State *L);
|
||||
static int deleteSavedScreen(lua_State *L);
|
||||
|
||||
private:
|
||||
lua_State* lua;
|
||||
|
||||
};
|
||||
|
||||
#endif /* _LUAINSTANCE_H */
|
||||
|
Reference in New Issue
Block a user