lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


eek - that looks expensive!

thanks anyway

On Mar 15, 2007, at 5:16 PM, Alex Queiroz wrote:

Hallo,

On 3/15/07, Graham Wakefield <lists@grahamwakefield.net> wrote:
Oh and an obvious extension would be:

function makeMethod(obj, func)
        -- local f = copy func     -- how can I do this in Lua?
          local f = loadstring(string.dump(func))
        setfenv(f, obj)
        return f
end


Cheers,
--
-alex
http://www.ventonegro.org/