diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-16 15:39:16 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-16 15:39:16 -0200 |
commit | 2b5bc5d1a81579a76c13e638de2592e2c39c73f0 (patch) | |
tree | 8294278f9fbd2565d3a2cd11642fed41982824bd /strlib.c | |
parent | 94686ce58554a80374eeff115ee5b87c184ed173 (diff) | |
download | lua-2b5bc5d1a81579a76c13e638de2592e2c39c73f0.tar.gz lua-2b5bc5d1a81579a76c13e638de2592e2c39c73f0.tar.bz2 lua-2b5bc5d1a81579a76c13e638de2592e2c39c73f0.zip |
new module for memory allocation
Diffstat (limited to 'strlib.c')
-rw-r--r-- | strlib.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -3,12 +3,12 @@ | |||
3 | ** String library to LUA | 3 | ** String library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_strlib="$Id: strlib.c,v 1.3 1994/08/17 15:10:04 celes Exp roberto $"; | 6 | char *rcs_strlib="$Id: strlib.c,v 1.4 1994/10/18 18:34:47 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <stdlib.h> | ||
9 | #include <string.h> | 8 | #include <string.h> |
10 | #include <ctype.h> | 9 | #include <ctype.h> |
11 | 10 | ||
11 | #include "mem.h" | ||
12 | #include "lua.h" | 12 | #include "lua.h" |
13 | #include "lualib.h" | 13 | #include "lualib.h" |
14 | 14 | ||
@@ -73,7 +73,7 @@ static void str_sub (void) | |||
73 | s[end] = 0; | 73 | s[end] = 0; |
74 | lua_pushstring (&s[start-1]); | 74 | lua_pushstring (&s[start-1]); |
75 | } | 75 | } |
76 | free (s); | 76 | luaI_free(s); |
77 | } | 77 | } |
78 | 78 | ||
79 | /* | 79 | /* |
@@ -94,7 +94,7 @@ static void str_lower (void) | |||
94 | c++; | 94 | c++; |
95 | } | 95 | } |
96 | lua_pushstring(s); | 96 | lua_pushstring(s); |
97 | free(s); | 97 | luaI_free(s); |
98 | } | 98 | } |
99 | 99 | ||
100 | 100 | ||
@@ -116,7 +116,7 @@ static void str_upper (void) | |||
116 | c++; | 116 | c++; |
117 | } | 117 | } |
118 | lua_pushstring(s); | 118 | lua_pushstring(s); |
119 | free(s); | 119 | luaI_free(s); |
120 | } | 120 | } |
121 | 121 | ||
122 | 122 | ||