lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



LTN 2 - Minimal Lua 4.0 installations shows the way to minimal Lua in 4.0.
While i am trying to work on Lua 5.1 follow this instruction, some thing seems to be different from 4.0 to 5.1.

I am tring to remove the lparser. A stubs is created like this.
#include "llex.h"
#include "lparser.h"


void luaX_init(lua_State *L) {
  UNUSED(L);
}

Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff,
                                            const char *name){
  UNUSED(z);
  UNUSED(buff);
  UNUSED(name);  
  lua_error(L);
  return NULL;
}

Then i delete llex.c and lparser.c from project.
The compile result shows the function luaX_syntaxerror() in Llex.c is called in module lcode.
It is easy to remove lcode        in Lua4.0.
The notes said:
"To remove the code generator too, you need to add #include "lcode.h" and copy luaK_opproperties from lcode.c into this code."
But how to remove lcode in Lua5.1?

Thanks.


--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender.
This message has been scanned for viruses and Spam by ZTE Anti-Spam system.