aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-11-05 16:28:59 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-11-05 16:28:59 +0100
commit47e82949164c23973dbad72d3982d9aef557d118 (patch)
tree27b0ff988cbdd896a27f52882a8da77a27ecb7be /vis-lua.h
parentfb414a7a85c6b8843d18030f07db0b8c80cc0251 (diff)
downloadvis-47e82949164c23973dbad72d3982d9aef557d118.tar.gz
vis-47e82949164c23973dbad72d3982d9aef557d118.tar.xz
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.
Diffstat (limited to 'vis-lua.h')
-rw-r--r--vis-lua.h6
1 files changed, 4 insertions, 2 deletions
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*);