* 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 */
| 242 | * and LUAC_HEADERSIZE in lundump.h |
| 243 | */ |
| 244 | void 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 | } |
no outgoing calls
no test coverage detected