From 47e82949164c23973dbad72d3982d9aef557d118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 5 Nov 2016 16:28:59 +0100 Subject: vis: display Lua package.cpath in :help output These paths are used to load the Lua LPeg module (lpeg.so) and are thus helpful when diagnosing setup problems in case syntax highlighting does not work. --- vis-lua.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'vis-lua.h') diff --git a/vis-lua.h b/vis-lua.h index 644ce73..9732735 100644 --- a/vis-lua.h +++ b/vis-lua.h @@ -13,8 +13,10 @@ typedef struct lua_State lua_State; /* add a directory to consider when loading lua files */ bool vis_lua_path_add(Vis*, const char *path); -/* get semi colon separated list of paths to load lua files */ -const char *vis_lua_paths_get(Vis*); +/* get semicolon separated list of paths to load lua files + * (*lpath = package.path) and Lua C modules (*cpath = package.cpath) + * both these pointers need to be free(3)-ed by the caller */ +bool vis_lua_paths_get(Vis*, char **lpath, char **cpath); /* various event handlers, triggered by the vis core */ void vis_lua_init(Vis*); -- cgit v1.2.3