httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <br...@akins.org>
Subject Re: [mod_lua] vm management
Date Fri, 06 Feb 2009 15:10:23 GMT
On 2/6/09 12:17 AM, "Brian McCallister" <brianm@skife.org> wrote:

> * One entry point to obtain VMs
>   This is the apl_get_lua_state(..) function. It is passed the
>   information required to either find, or create the needed
>   lua_State. This is:
> 
>   - the lifecycle pool to which it is bound
>   - the file name to define stuff in the lua_State
>   - package load paths for the lua_State
>   - package load paths for lua cmodules
>   - a callback and baton to be invoked if the lua_State is created


Do we really need paths and cpaths to be configurable in any way besides
globally?  In individual scripts, you can add more paths.

Also, we already have the lua_open hook as well as lua_request hook, so the
callback doesn't really need to be there either.

So, I'd propose that we change it to this:

 apl_get_lua_state(apr_pool_t *pool, const char *file, const char *data)

Pool is the lifecycle pool to which it is bound. File is , usually, the file
name to define stuff in the lua_State.  Data is a raw string to use (rather
than a file) and if present, then file is used as an identifier.  The whole
"spec" idea, then is only for internal mod_lua use, not for general
consumption.

Thoughts?




Mime
View raw message