forked from enlightenment/efl
elua: more reliable eoid->lua number conversion
This commit is contained in:
parent
e75cf0db13
commit
8bb13b626f
|
@ -112,11 +112,8 @@ ffi.cdef [[
|
||||||
extern const Eo_Event_Description _EO_BASE_EVENT_DEL;
|
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)
|
local eo_obj_addr_get = function(x)
|
||||||
local v = addr_d()
|
return tonumber(ffi.cast("intptr_t", x))
|
||||||
v.p = x
|
|
||||||
return tonumber(v.d)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local cutil = require("cutil")
|
local cutil = require("cutil")
|
||||||
|
|
Loading…
Reference in New Issue