diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:52:54 +0100 |
| commit | dcacc00e3750300617ba6e16eb346713f91a783a (patch) | |
| tree | 38e2d4fb5ed9d119711d4295c6eda4b014af73fd /examples/redis-unstable/src/script_lua.h | |
| parent | 58dac10aeb8f5a041c46bddbeaf4c7966a99b998 (diff) | |
| download | crep-dcacc00e3750300617ba6e16eb346713f91a783a.tar.gz | |
Remove testing data
Diffstat (limited to 'examples/redis-unstable/src/script_lua.h')
| -rw-r--r-- | examples/redis-unstable/src/script_lua.h | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/examples/redis-unstable/src/script_lua.h b/examples/redis-unstable/src/script_lua.h deleted file mode 100644 index 4c2c3e9..0000000 --- a/examples/redis-unstable/src/script_lua.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2009-Present, Redis Ltd. - * All rights reserved. - * - * Licensed under your choice of (a) the Redis Source Available License 2.0 - * (RSALv2); or (b) the Server Side Public License v1 (SSPLv1); or (c) the - * GNU Affero General Public License v3 (AGPLv3). - */ - -#ifndef __SCRIPT_LUA_H_ -#define __SCRIPT_LUA_H_ - -/* - * script_lua.c unit provides shared functionality between - * eval.c and function_lua.c. Functionality provided: - * - * * Execute Lua code, assuming that the code is located on - * the top of the Lua stack. In addition, parsing the execution - * result and convert it to the resp and reply ot the client. - * - * * Run Redis commands from within the Lua code (Including - * parsing the reply and create a Lua object out of it). - * - * * Register Redis API to the Lua interpreter. Only shared - * API are registered (API that is only relevant on eval.c - * (like debugging) are registered on eval.c). - * - * Uses script.c for interaction back with Redis. - */ - -#include "server.h" -#include "script.h" -#include <lua.h> -#include <lauxlib.h> -#include <lualib.h> - -#define REGISTRY_RUN_CTX_NAME "__RUN_CTX__" -#define REGISTRY_SET_GLOBALS_PROTECTION_NAME "__GLOBAL_PROTECTION__" -#define REDIS_API_NAME "redis" - -typedef struct errorInfo { - sds msg; - sds source; - sds line; - int ignore_err_stats_update; -}errorInfo; - -void luaRegisterRedisAPI(lua_State* lua); -sds luaGetStringSds(lua_State *lua, int index); -void luaRegisterGlobalProtectionFunction(lua_State *lua); -void luaSetErrorMetatable(lua_State *lua); -void luaSetAllowListProtection(lua_State *lua); -void luaSetTableProtectionRecursively(lua_State *lua); -void luaSetTableProtectionForBasicTypes(lua_State *lua); -void luaRegisterLogFunction(lua_State* lua); -void luaRegisterVersion(lua_State* lua); -void luaPushErrorBuff(lua_State *lua, sds err_buff); -void luaPushError(lua_State *lua, const char *error); -int luaError(lua_State *lua); -void luaSaveOnRegistry(lua_State* lua, const char* name, void* ptr); -void* luaGetFromRegistry(lua_State* lua, const char* name); -void luaCallFunction(scriptRunCtx* r_ctx, lua_State *lua, robj** keys, size_t nkeys, robj** args, size_t nargs, int debug_enabled); -void luaExtractErrorInformation(lua_State *lua, errorInfo *err_info); -void luaErrorInformationDiscard(errorInfo *err_info); -unsigned long luaMemory(lua_State *lua); -void luaGC(lua_State *lua, int *gc_count); - -#endif /* __SCRIPT_LUA_H_ */ |
