diff src/lua/lstring.h @ 11:27763b933818

raise lua sources up one level
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 11:07:39 -0600
parents src/lua/src/lstring.h@f9f4f1b99eed
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/lua/lstring.h	Sat Mar 03 11:07:39 2012 -0600
     1.3 @@ -0,0 +1,31 @@
     1.4 +/*
     1.5 +** $Id: lstring.h,v 1.43.1.1 2007/12/27 13:02:25 roberto Exp $
     1.6 +** String table (keep all strings handled by Lua)
     1.7 +** See Copyright Notice in lua.h
     1.8 +*/
     1.9 +
    1.10 +#ifndef lstring_h
    1.11 +#define lstring_h
    1.12 +
    1.13 +
    1.14 +#include "lgc.h"
    1.15 +#include "lobject.h"
    1.16 +#include "lstate.h"
    1.17 +
    1.18 +
    1.19 +#define sizestring(s)	(sizeof(union TString)+((s)->len+1)*sizeof(char))
    1.20 +
    1.21 +#define sizeudata(u)	(sizeof(union Udata)+(u)->len)
    1.22 +
    1.23 +#define luaS_new(L, s)	(luaS_newlstr(L, s, strlen(s)))
    1.24 +#define luaS_newliteral(L, s)	(luaS_newlstr(L, "" s, \
    1.25 +                                 (sizeof(s)/sizeof(char))-1))
    1.26 +
    1.27 +#define luaS_fix(s)	l_setbit((s)->tsv.marked, FIXEDBIT)
    1.28 +
    1.29 +LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
    1.30 +LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
    1.31 +LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
    1.32 +
    1.33 +
    1.34 +#endif