diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-03-06 15:47:42 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-03-06 15:47:42 -0300 |
| commit | 043c2ac2584ee14865c41cbc07addd55f284e0a3 (patch) | |
| tree | 0796c645370e32ba9d6349815e32c87d5c31cf86 /lapi.c | |
| parent | 88a2023c3285c4514519158fba90e644fc6ffca3 (diff) | |
| download | lua-043c2ac2584ee14865c41cbc07addd55f284e0a3.tar.gz lua-043c2ac2584ee14865c41cbc07addd55f284e0a3.tar.bz2 lua-043c2ac2584ee14865c41cbc07addd55f284e0a3.zip | |
new names for "lua_pushlstr" and "lua_getstrlen"
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 1.21 1998/02/12 19:23:32 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 1.22 1998/03/06 16:54:42 roberto Exp roberto $ |
| 3 | ** Lua API | 3 | ** Lua API |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -293,7 +293,7 @@ char *lua_getstring (lua_Object object) | |||
| 293 | else return (svalue(Address(object))); | 293 | else return (svalue(Address(object))); |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | long lua_getstrlen (lua_Object object) | 296 | long lua_strlen (lua_Object object) |
| 297 | { | 297 | { |
| 298 | luaC_checkGC(); /* "tostring" may create a new string */ | 298 | luaC_checkGC(); /* "tostring" may create a new string */ |
| 299 | if (object == LUA_NOOBJECT || tostring(Address(object))) | 299 | if (object == LUA_NOOBJECT || tostring(Address(object))) |
| @@ -329,7 +329,7 @@ void lua_pushnumber (double n) | |||
| 329 | incr_top; | 329 | incr_top; |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | void lua_pushlstr (char *s, long len) | 332 | void lua_pushlstring (char *s, long len) |
| 333 | { | 333 | { |
| 334 | tsvalue(L->stack.top) = luaS_newlstr(s, len); | 334 | tsvalue(L->stack.top) = luaS_newlstr(s, len); |
| 335 | ttype(L->stack.top) = LUA_T_STRING; | 335 | ttype(L->stack.top) = LUA_T_STRING; |
| @@ -342,7 +342,7 @@ void lua_pushstring (char *s) | |||
| 342 | if (s == NULL) | 342 | if (s == NULL) |
| 343 | lua_pushnil(); | 343 | lua_pushnil(); |
| 344 | else | 344 | else |
| 345 | lua_pushlstr(s, strlen(s)); | 345 | lua_pushlstring(s, strlen(s)); |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | void lua_pushCclosure (lua_CFunction fn, int n) | 348 | void lua_pushCclosure (lua_CFunction fn, int n) |
