diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-01-26 10:11:28 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-01-26 10:11:28 -0200 |
commit | ca7be1cfeb7864df4fa7d58c9314894b14942871 (patch) | |
tree | d5a9826a1b8a99b2ae224e3ab73e8059eafcf43a | |
parent | 445872a6e2ee7a7ae030a8e2f8a5526f95f08f4c (diff) | |
download | lua-ca7be1cfeb7864df4fa7d58c9314894b14942871.tar.gz lua-ca7be1cfeb7864df4fa7d58c9314894b14942871.tar.bz2 lua-ca7be1cfeb7864df4fa7d58c9314894b14942871.zip |
elimination of function "int2str", as it can be replaced by "format('%c', .)"
-rw-r--r-- | strlib.c | 15 |
1 files changed, 1 insertions, 14 deletions
@@ -3,7 +3,7 @@ | |||
3 | ** String library to LUA | 3 | ** String library to LUA |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_strlib="$Id: strlib.c,v 1.14 1995/11/10 17:54:31 roberto Exp roberto $"; | 6 | char *rcs_strlib="$Id: strlib.c,v 1.15 1996/01/22 17:38:57 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <string.h> | 8 | #include <string.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
@@ -167,18 +167,6 @@ static void str_ascii (void) | |||
167 | lua_pushnumber(s[pos]); | 167 | lua_pushnumber(s[pos]); |
168 | } | 168 | } |
169 | 169 | ||
170 | /* | ||
171 | ** converts one or more integers to chars in a string | ||
172 | */ | ||
173 | static void str_int2str (void) | ||
174 | { | ||
175 | int i = 0; | ||
176 | luaI_addchar(0); | ||
177 | while (lua_getparam(++i) != LUA_NOOBJECT) | ||
178 | luaI_addchar((int)lua_check_number(i, "int2str")); | ||
179 | lua_pushstring(luaI_addchar(0)); | ||
180 | } | ||
181 | |||
182 | 170 | ||
183 | #define MAX_CONVERTION 2000 | 171 | #define MAX_CONVERTION 2000 |
184 | #define MAX_FORMAT 50 | 172 | #define MAX_FORMAT 50 |
@@ -256,6 +244,5 @@ void strlib_open (void) | |||
256 | lua_register ("strlower", str_lower); | 244 | lua_register ("strlower", str_lower); |
257 | lua_register ("strupper", str_upper); | 245 | lua_register ("strupper", str_upper); |
258 | lua_register ("ascii", str_ascii); | 246 | lua_register ("ascii", str_ascii); |
259 | lua_register ("int2str", str_int2str); | ||
260 | lua_register ("format", io_format); | 247 | lua_register ("format", io_format); |
261 | } | 248 | } |