diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-09 16:11:47 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-09 16:11:47 -0200 |
commit | 5f2d187b7385480b5893f7caa2efbf98f76f8578 (patch) | |
tree | 9f930c239e30b93a68b89c525c4717b77ee88a36 /table.c | |
parent | 6b387e01b23a36c70e3fee94ffa3a796a2dc3596 (diff) | |
download | lua-5f2d187b7385480b5893f7caa2efbf98f76f8578.tar.gz lua-5f2d187b7385480b5893f7caa2efbf98f76f8578.tar.bz2 lua-5f2d187b7385480b5893f7caa2efbf98f76f8578.zip |
frees file names when unstacked
Diffstat (limited to 'table.c')
-rw-r--r-- | table.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** Module to control static tables | 3 | ** Module to control static tables |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_table="$Id: table.c,v 2.12 1994/11/07 16:34:44 roberto Exp roberto $"; | 6 | char *rcs_table="$Id: table.c,v 2.13 1994/11/08 20:07:54 roberto Exp $"; |
7 | 7 | ||
8 | #include <stdlib.h> | 8 | #include <stdlib.h> |
9 | #include <string.h> | 9 | #include <string.h> |
@@ -235,7 +235,7 @@ char *lua_createstring (char *s) | |||
235 | */ | 235 | */ |
236 | char *lua_addfile (char *fn) | 236 | char *lua_addfile (char *fn) |
237 | { | 237 | { |
238 | if (lua_nfile >= MAXFILE-1) | 238 | if (lua_nfile >= MAXFILE) |
239 | return "too many files"; | 239 | return "too many files"; |
240 | if ((lua_file[lua_nfile++] = strdup (fn)) == NULL) | 240 | if ((lua_file[lua_nfile++] = strdup (fn)) == NULL) |
241 | return "not enough memory"; | 241 | return "not enough memory"; |
@@ -247,7 +247,7 @@ char *lua_addfile (char *fn) | |||
247 | */ | 247 | */ |
248 | int lua_delfile (void) | 248 | int lua_delfile (void) |
249 | { | 249 | { |
250 | free(lua_file[lua_nfile--]); | 250 | free(lua_file[--lua_nfile]); |
251 | return 1; | 251 | return 1; |
252 | } | 252 | } |
253 | 253 | ||