[Sputnik-list] Re: Versium-SVN (was: Permissions)
pierre pracht
pierre.pracht at gmail.com
Fri Feb 29 13:08:01 GMT+2 2008
Le 29 févr. 08 à 11:22, Yuri Takhteyev a écrit :
> I haven't applied the patch you sent since it simply reverted the
> earlier change. If you want the old functionality, you can simply
> update rocks/versium to r193.
No, I have let git make the patch and didn't check it :
>> - }:do_lua(page.content)
>> + }.do_lua(page.content)
The patch is simply inverted.
svn code use }.do my code use }:do
git have make a patch who revert my code to svn code.
patch -p1 -R < versium.patch
and skip blueprint_css and you're done.
But the main question of this patch was some un-working code :
>> function Sandbox:new(values, logger)
>> - self.env = {}
>> - setmetatable(self.env, self) --needed ?
>> - self.env.values = values or {}
>> - self.returned_value = nil
>> - self.logger = logger
>> - return self
>> + local env = {}
>> + setmetatable(env, self)
>> + env.values = values or {}
>> + env.returned_value = nil
>> + env.logger = logger
>> + return env
>> end
>> function Sandbox:do_lua(lua)
>> - local f,err = loadstring(lua or "")
>> + local f,err = loadstring(lua)
>> if f then
>> - setfenv(f, self.env.values)
>> - self.env.returned_value, err = f()
>> + setfenv(f, env.values)
>> + env.returned_value, err = f()
>> end
I'm not sure of the meaning of sandbox end env.
So I don't think that I have make the right change.
I didn't grasp lua sand-boxing.
> ....
> Either way, in a few days I will change it back to
> Sanbox:new() style together with the modules that use it, check
> everything in at the same time, and release a new set of rocks.
I will wait for it.
Lua gives me some bad time in the quest of a stable setup.
> Hopefully this is enough information.
Yes, I'm sorry for the noise.
I haven't mean to be harsh, I needed confirmation of the intended
change.
- pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.luaforge.net/pipermail/sputnik-list/attachments/20080229/8a3ffaa4/attachment.htm
More information about the Sputnik-list
mailing list