From f0667db7c9dc5160ce7b3188544766ac6ee63618 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 10 Jul 2009 21:24:37 -0400 Subject: Compile as C99. --- src/lua_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lua_interface.c') 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; } -- cgit v1.2.3