summaryrefslogtreecommitdiff
path: root/src/bindings/lua/eina/hamster.lua
blob: e8f5e7434fb1cd12ebae12955f9ca40d9dc5db8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- EFL LuaJIT bindings: Eina (hamster module)
-- For use with Elua

local ffi = require("ffi")

ffi.cdef [[
    int eina_hamster_count(void);
]]

local cutil = require("cutil")
local util  = require("util")

local M = {}

local eina

local init = function()
    eina = util.lib_load("eina")
end

local shutdown = function()
    util.lib_unload("eina")
end

cutil.init_module(init, shutdown)

M.count = function()
    return tonumber(eina.eina_hamster_count())
end

return M