diff options
Diffstat (limited to 'lstring.h')
| -rw-r--r-- | lstring.h | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstring.h,v 1.43 2005/04/25 19:24:10 roberto Exp roberto $ | 2 | ** $Id: lstring.h,v 1.44 2010/03/13 15:55:01 roberto Exp roberto $ |
| 3 | ** String table (keep all strings handled by Lua) | 3 | ** String table (keep all strings handled by Lua) |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -7,8 +7,6 @@ | |||
| 7 | #ifndef lstring_h | 7 | #ifndef lstring_h |
| 8 | #define lstring_h | 8 | #define lstring_h |
| 9 | 9 | ||
| 10 | #include <string.h> | ||
| 11 | |||
| 12 | #include "lgc.h" | 10 | #include "lgc.h" |
| 13 | #include "lobject.h" | 11 | #include "lobject.h" |
| 14 | #include "lstate.h" | 12 | #include "lstate.h" |
| @@ -18,7 +16,6 @@ | |||
| 18 | 16 | ||
| 19 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) | 17 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) |
| 20 | 18 | ||
| 21 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) | ||
| 22 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ | 19 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ |
| 23 | (sizeof(s)/sizeof(char))-1)) | 20 | (sizeof(s)/sizeof(char))-1)) |
| 24 | 21 | ||
| @@ -27,6 +24,7 @@ | |||
| 27 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); | 24 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); |
| 28 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); | 25 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); |
| 29 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); | 26 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); |
| 27 | LUAI_FUNC TString *luaS_new (lua_State *L, const char *str); | ||
| 30 | 28 | ||
| 31 | 29 | ||
| 32 | #endif | 30 | #endif |
