|
|
||
|
On May 04, 2006, at 21:41, Joshua Jensen wrote:
Luiz Henrique de Figueiredo wrote:A small point of interest. When working the Xbox 360, the above endianness didn't work using a local variable. Instead, I had to create a static global. :( This was under Lua 5.0, but I'm guessing it will still apply now.void luaU_header (char* h) { int x=1; *h++=(char)*(char*)&x; /* endianness */ }
static int x = 1;
int luaU_endianness (void) { /* int x=1; */ return *(char*)&x; }
Take it for what it's worth.
drj