aboutsummaryrefslogtreecommitdiff
path: root/src/lua_interface.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-07-10 21:24:37 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2009-07-10 21:24:37 -0400
commitf0667db7c9dc5160ce7b3188544766ac6ee63618 (patch)
treed384931a0e51ae584d795e6b973ff6677bed69c1 /src/lua_interface.c
parente4b4d124e52ec85799f8a581f3bf968ceb431cdc (diff)
downloadtextadept-f0667db7c9dc5160ce7b3188544766ac6ee63618.tar.gz
textadept-f0667db7c9dc5160ce7b3188544766ac6ee63618.zip
Compile as C99.
Diffstat (limited to 'src/lua_interface.c')
-rw-r--r--src/lua_interface.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c
index 5b680956..58a237fe 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -1244,12 +1244,11 @@ static int l_cf_view_goto_buffer(lua_State *lua) {
static int l_cf_ta_dialog(lua_State *lua) {
GCDialogType type = gcocoadialog_type(luaL_checkstring(lua, 1));
int i, argc = lua_gettop(lua) - 1;
- const char **argv = malloc(argc * sizeof(char *));
+ const char *argv[argc];
for (i = 0; i < argc; i++) argv[i] = luaL_checkstring(lua, i + 2);
char *out = gcocoadialog(type, argc, argv);
lua_pushstring(lua, out);
free(out);
- free(argv);
return 1;
}