diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-11-13 16:28:13 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-11-13 16:28:13 -0800 |
commit | 7a24bed432a480b797da710f939aa46bd7e608c5 (patch) | |
tree | 3f7f884d1da998310eaf7048ad864d70fd00f0c6 | |
parent | 998e666958e1b4ab8d1213c8bd5bf49f14605c6a (diff) | |
download | teliva-7a24bed432a480b797da710f939aa46bd7e608c5.tar.gz |
.
-rw-r--r-- | src/lua.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lua.c b/src/lua.c index 2000c0f..88052d0 100644 --- a/src/lua.c +++ b/src/lua.c @@ -309,8 +309,8 @@ static int handle_image (lua_State *L, char **argv, int n) { } -char *Current_definition = NULL; -void save_to_current_definition_and_editor_buffer (lua_State *L, char *definition) { +const char *Current_definition = NULL; +void save_to_current_definition_and_editor_buffer (lua_State *L, const char *definition) { Current_definition = definition; lua_getglobal(L, "teliva_program"); lua_getfield(L, -1, Current_definition); @@ -331,7 +331,7 @@ static void read_contents (lua_State *L, char *filename, char *out) { /* table to update is at top of stack */ -static void update_definition (lua_State *L, char *name, char *out) { +static void update_definition (lua_State *L, const char *name, char *out) { lua_pushstring(L, out); lua_setfield(L, -2, name); } |