Browse Source

Was too quick with last commit... Actually fix conflicts due to rebase

Stanislav Galabov 11 years ago
parent
commit
9d981594ec
5 changed files with 0 additions and 51 deletions
  1. 0 13
      plugins/lua/lua_fini.c
  2. 0 17
      plugins/lua/lua_init.c
  3. 0 6
      plugins/lua/module.am
  4. 0 8
      plugins/lua/plugin_init.c
  5. 0 7
      plugins/lua/private.h

+ 0 - 13
plugins/lua/lua_fini.c

@@ -1,13 +0,0 @@
-#include <stdlib.h>
-
-#include "private.h"
-
-CLISH_HOOK_FINI(clish_plugin_lua_fini)
-{
-	clish_context_t *context = (clish_context_t *) clish_context;
-	lua_State *L = clish_shell__del_udata(context->shell, LUA_UDATA);
-
-	lua_close(L);
-
-	return (0);
-}

+ 0 - 17
plugins/lua/lua_init.c

@@ -6,11 +6,8 @@
 
 #include "private.h"
 
-<<<<<<< HEAD
 char *scripts_path = NULL;
 
-=======
->>>>>>> b9e9072034ce6f652f230161cea580b52cf5a9b9
 static bool_t
 load_scripts(lua_State *L, char *path)
 {
@@ -65,16 +62,6 @@ load_scripts(lua_State *L, char *path)
 int clish_plugin_init_lua(clish_shell_t *shell)
 {
 	lua_State *L = NULL;
-<<<<<<< HEAD
-=======
-	char *scripts_path = getenv("CLISH_SCRIPTS_PATH");
-
-	if (!scripts_path)
-		if(!(scripts_path = getenv("CLISH_PATH"))) {
-			printf("%s: Lua scripts dir not specified\n", __func__);
-			return (-1);
-		}
->>>>>>> b9e9072034ce6f652f230161cea580b52cf5a9b9
 
 	if (!(L = luaL_newstate())) {
 		printf("%s: Failed to instantiate Lua interpreter\n", __func__);
@@ -83,11 +70,7 @@ int clish_plugin_init_lua(clish_shell_t *shell)
 
 	luaL_openlibs(L);
 
-<<<<<<< HEAD
 	if (scripts_path && !load_scripts(L, scripts_path)) {
-=======
-	if (!load_scripts(L, scripts_path)) {
->>>>>>> b9e9072034ce6f652f230161cea580b52cf5a9b9
 		return (-1);
 	}
 

+ 0 - 6
plugins/lua/module.am

@@ -20,12 +20,6 @@ nobase_include_HEADERS		+= \
 
 clish_plugin_lua_la_SOURCES	+= \
 	plugins/lua/plugin_init.c \
-<<<<<<< HEAD
 	plugins/lua/plugin_fini.c \
-	plugins/lua/lua_init.c \
-=======
-	plugins/lua/lua_init.c \
-	plugins/lua/lua_fini.c \
->>>>>>> b9e9072034ce6f652f230161cea580b52cf5a9b9
 	plugins/lua/lua_action.c \
 	plugins/lua/lua_print_error.c

+ 0 - 8
plugins/lua/plugin_init.c

@@ -2,7 +2,6 @@
 
 CLISH_PLUGIN_INIT
 {
-<<<<<<< HEAD
 	char *conf = clish_plugin__get_conf(plugin);
 
 	if (conf)
@@ -12,13 +11,6 @@ CLISH_PLUGIN_INIT
 
 	clish_plugin__set_name(plugin, "lua_hooks");
 
-=======
-
-	clish_plugin_init_lua((clish_shell_t *)clish_shell);
-
-	clish_plugin_add_phook(plugin, clish_plugin_lua_fini, "hook_fini",
-			CLISH_SYM_TYPE_FINI);
->>>>>>> b9e9072034ce6f652f230161cea580b52cf5a9b9
 	clish_plugin_add_sym(plugin, clish_plugin_lua_action, "hook_action");
 
 	return 0;

+ 0 - 7
plugins/lua/private.h

@@ -9,17 +9,10 @@
 
 #define LUA_UDATA	"lua state"
 
-<<<<<<< HEAD
 extern char *scripts_path;
 void l_print_error(lua_State *, const char *, const char *, int);
 int clish_plugin_init_lua(clish_shell_t *shell);
 
-=======
-void l_print_error(lua_State *, const char *, const char *, int);
-int clish_plugin_init_lua(clish_shell_t *shell);
-
-CLISH_HOOK_FINI(clish_plugin_lua_fini);
->>>>>>> b9e9072034ce6f652f230161cea580b52cf5a9b9
 CLISH_PLUGIN_SYM(clish_plugin_lua_action);
 
 #endif /* _PLUGIN_H_ */