MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaU_header

Function luaU_header

third-party/lua-5.2.4/src/lundump.c:244–258  ·  view source on GitHub ↗

* make header for precompiled chunks * if you change the code below be sure to update LoadHeader and FORMAT above * and LUAC_HEADERSIZE in lundump.h */

Source from the content-addressed store, hash-verified

242* and LUAC_HEADERSIZE in lundump.h
243*/
244void luaU_header (lu_byte* h)
245{
246 int x=1;
247 memcpy(h,LUA_SIGNATURE,sizeof(LUA_SIGNATURE)-sizeof(char));
248 h+=sizeof(LUA_SIGNATURE)-sizeof(char);
249 *h++=cast_byte(VERSION);
250 *h++=cast_byte(FORMAT);
251 *h++=cast_byte(*(char*)&x); /* endianness */
252 *h++=cast_byte(sizeof(int));
253 *h++=cast_byte(sizeof(size_t));
254 *h++=cast_byte(sizeof(Instruction));
255 *h++=cast_byte(sizeof(lua_Number));
256 *h++=cast_byte(((lua_Number)0.5)==0); /* is lua_Number integral? */
257 memcpy(h,LUAC_TAIL,sizeof(LUAC_TAIL)-sizeof(char));
258}

Callers 2

LoadHeaderFunction · 0.70
DumpHeaderFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected