minor amend

This commit is contained in:
Cloud Wu
2015-08-27 13:49:31 +08:00
parent bb6d5d826e
commit 9b0e496afe
3 changed files with 8 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
This is a modify version of lua 5.3.1 (http://www.lua.org/ftp/lua-5.3.1.tar.gz) .
For detail : http://lua-users.org/lists/lua-l/2014-03/msg00489.html
For detail ,
Shared Proto : http://lua-users.org/lists/lua-l/2014-03/msg00489.html
Shared short string table : http://blog.codingnow.com/2015/08/lua_vm_share_string.html

View File

@@ -43,6 +43,8 @@ LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s);
LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
#define ENABLE_SHORT_STRING_TABLE
LUA_API void luaS_initshr();
LUA_API void luaS_exitshr();
LUA_API void luaS_expandshr(int n);

View File

@@ -1,11 +1,10 @@
#ifndef LUA_SHORT_STRING_TABLE_H
#define LUA_SHORT_STRING_TABLE_H
#ifndef DISABLE_SHORT_STRING
#include "lstring.h"
#else
// If you use modified lua, this macro would be defined in lstring.h
#ifndef ENABLE_SHORT_STRING_TABLE
static inline int luaS_shrinfo(lua_State *L) { return 0; }
static inline void luaS_initshr() {}