diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-01-14 13:40:26 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-01-14 13:40:26 -0200 |
| commit | f4591397da8444d1917a67a34cb6a6ac8137385e (patch) | |
| tree | 749a23af6964bee4a373aecf13f3cdfcda8656f0 /strlib.c | |
| parent | 8faf4d1de2cbda61ae871fc23091deff3672e0fc (diff) | |
| download | lua-f4591397da8444d1917a67a34cb6a6ac8137385e.tar.gz lua-f4591397da8444d1917a67a34cb6a6ac8137385e.tar.bz2 lua-f4591397da8444d1917a67a34cb6a6ac8137385e.zip | |
strdup is done via mem.c to control its memory allocation
Diffstat (limited to 'strlib.c')
| -rw-r--r-- | strlib.c | 6 |
1 files changed, 3 insertions, 3 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.7 1994/12/16 15:53:57 roberto Exp roberto $"; | 6 | char *rcs_strlib="$Id: strlib.c,v 1.8 1995/01/06 20:31:10 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | #include <string.h> | 8 | #include <string.h> |
| 9 | #include <ctype.h> | 9 | #include <ctype.h> |
| @@ -109,7 +109,7 @@ static void str_lower (void) | |||
| 109 | lua_Object o = lua_getparam (1); | 109 | lua_Object o = lua_getparam (1); |
| 110 | if (!lua_isstring(o)) | 110 | if (!lua_isstring(o)) |
| 111 | lua_error ("incorrect arguments to function `strlower'"); | 111 | lua_error ("incorrect arguments to function `strlower'"); |
| 112 | c = s = strdup(lua_getstring(o)); | 112 | c = s = luaI_strdup(lua_getstring(o)); |
| 113 | while (*c != 0) | 113 | while (*c != 0) |
| 114 | { | 114 | { |
| 115 | *c = tolower(*c); | 115 | *c = tolower(*c); |
| @@ -131,7 +131,7 @@ static void str_upper (void) | |||
| 131 | lua_Object o = lua_getparam (1); | 131 | lua_Object o = lua_getparam (1); |
| 132 | if (!lua_isstring(o)) | 132 | if (!lua_isstring(o)) |
| 133 | lua_error ("incorrect arguments to function `strlower'"); | 133 | lua_error ("incorrect arguments to function `strlower'"); |
| 134 | c = s = strdup(lua_getstring(o)); | 134 | c = s = luaI_strdup(lua_getstring(o)); |
| 135 | while (*c != 0) | 135 | while (*c != 0) |
| 136 | { | 136 | { |
| 137 | *c = toupper(*c); | 137 | *c = toupper(*c); |
