[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: C API - Holding on to functions for usage later ?
- From: Matthew Metnetsky <met@...>
- Date: Thu, 9 Oct 2008 17:39:37 -0400
Hi all,
I've recently started embedding Lua as a configuration/script extension to a
program I am working on. I've got some of the basics down, at least enough for
simple configs. At the moment however I'm trying to work with someting like
this:
application = {
exec = '/bin/ls',
can_restart = function(exit_code)
return exit_code ~= 0
end
}
I can store the value of application.exec, but I would love to be able to
somehow store application.can_restart so that I can utilize it later. Despite
scoping issues within the function, is there anyway something like this can be
done?
Thanks in advance!
~ Matthew
Attachment:
signature.asc
Description: Digital signature