mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
'luaS_new' changed from macro to function
This commit is contained in:
parent
a08fc34ee4
commit
f80ff7a336
2 changed files with 8 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** $Id: lstring.c,v 2.15 2009/12/11 21:31:14 roberto Exp roberto $
|
||||
** $Id: lstring.c,v 2.16 2009/12/16 16:42:58 roberto Exp roberto $
|
||||
** String table (keeps all strings handled by Lua)
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -94,6 +94,11 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
|
|||
}
|
||||
|
||||
|
||||
TString *luaS_new (lua_State *L, const char *str) {
|
||||
return luaS_newlstr(L, str, strlen(str));
|
||||
}
|
||||
|
||||
|
||||
Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
|
||||
Udata *u;
|
||||
if (s > MAX_SIZET - sizeof(Udata))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue