Revert "elua: more reliable eoid->lua number conversion"

This reverts commit 8bb13b626f.

Seems like this method is not so reliable after all :) Results
in precision loss for Eo IDs, so revert to the old hacky way.
This commit is contained in:
Daniel Kolesa 2015-03-19 14:59:15 +00:00
parent 87263cf0bd
commit 9ef2b35317
1 changed files with 4 additions and 1 deletions

View File

@ -110,8 +110,11 @@ ffi.cdef [[
extern const Eo_Event_Description _EO_BASE_EVENT_DEL;
]]
local addr_d = ffi.typeof("union { double d; const Eo *p; }")
local eo_obj_addr_get = function(x)
return tonumber(ffi.cast("intptr_t", x))
local v = addr_d()
v.p = x
return tonumber(v.d)
end
local cutil = require("cutil")