Would 64bit Windows really be that different that it's exposing a flaw?
long = 4 bytes?
I managed to manage the resolution between Lua locals and C callbacks.
luaL_ref and __len metamethod using userdata.
__len metamethod seems to me to be the key.
static int myuserdata_size(lua_State *L) {
luaL_checkudata(L, 1, MYUSERDATA_REGISTRY);
lua_pushinteger(L, sizeof(struct MyUserData));
return 1;
}
regards,
Ranier Vilela