PANIC: unprotected error in call to Lua API
Hello, With the latest version and the following test-file "test.cld": --8<---------------cut here---------------start------------->8--- local t = {} package.seeall(t) setfenv(0, t) context.starttext() context"bla" context.stoptext() --8<---------------cut here---------------end--------------->8--- I get this error: PANIC: unprotected error in call to Lua API (attempt to index a nil value) -- Peter Münster Contact information: http://pmrb.free.fr/contact/
On 14-1-2011 4:54, Peter Münster wrote:
Hello,
With the latest version and the following test-file "test.cld":
--8<---------------cut here---------------start------------->8--- local t = {} package.seeall(t) setfenv(0, t) context.starttext() context"bla" context.stoptext() --8<---------------cut here---------------end--------------->8---
I get this error: PANIC: unprotected error in call to Lua API (attempt to index a nil value)
what do you want to achieve with the first three lines ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans Hagen
On 14-1-2011 4:54, Peter Münster wrote:
local t = {} package.seeall(t) setfenv(0, t)
what do you want to achieve with the first three lines
I want to prevent pollution of the global environment, when I need to define my own globals. But of course, I can do that with a name-space prefix, that's what I'm doing now. I've just posted the error, because perhaps it reveals a bug somewhere. -- Peter Münster Contact information: http://pmrb.free.fr/contact/
On 14-1-2011 5:51, Peter Münster wrote:
Hans Hagen
writes: On 14-1-2011 4:54, Peter Münster wrote:
local t = {} package.seeall(t) setfenv(0, t)
what do you want to achieve with the first three lines
I want to prevent pollution of the global environment, when I need to define my own globals. But of course, I can do that with a name-space prefix, that's what I'm doing now.
I've just posted the error, because perhaps it reveals a bug somewhere.
in lua 5.2 the environment related mechanism will change a bit anyway so best not depend on that now Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
pmlists@free.fr