lua-users home
lua-l archive

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


Hi zhiguo zhao,

Very like it, with apr.thread and apr.thread_queue, it's time to replace lua-lanes with lua-apr.

And some suggestion below.
1) int luaopen_apr_core(lua_State *L) should be LUA_API int luaopen_apr_core(lua_State *L), this will export luaopen_apr_core without def.( I use MSVC 2008 project to build it).

This is now fixed in git HEAD [1] but not using LUA_API, because if I'm not mistaken it works the wrong way round (resolving to __dllimport instead of __dllexport). Anyway declspec(__dllexport) is now included in the source code, so you can build the source code using a MSVC++ project.

2) apr2 in developing, and apr2 has no apu_version_string(), should use APR_MAJOR_VERSION to support apr2.

This is now fixed in git HEAD [2]. A previous patch of yours suggested this change as well but, because I've never used APR 2.x, I didn't even realize there was a problem to fix.

For other folks reading along: zhiguo zhao contributed the initial apr_dbd and apr_xml modules which are now included in Lua/APR, and an apr_ldap binding which I'll include soon.

3) in io_net.c, maybe sock-fd(really int) is created in c funcion and pass to lua side, this fd should support pass to apr-socket paramater to convert to apr-socket objects, just like  apr.socket_create([protocol [, family[,sock_fd_handle]]]) → socket I remeber someone hack luasocket to support this feature, With this I can replace luasocket with apr.socket

I'll look into this soon. Thanks for your contributions and feedback!

 - Peter Odding

[1] https://github.com/xolox/lua-apr/commit/2289ffbb1f0382c4b7e6
[2] https://github.com/xolox/lua-apr/commit/e037d8fa9c6341eaf786