[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: luasocket port to Lua 5.0 alpha
- From: "Kurt Jung" <kurt.jung@...>
- Date: Thu, 15 Aug 2002 17:23:19 -0400
Will there be an official port of the luasocket library (written by Diego Nehab) to Lua 5.0?
In attempting to port it myself I am running into the inevitable issues regarding tags and metatables. The library tags server sockets, client sockets, udp sockets and also the table which itself contains these tags. The "gc" tag method is used with server socket userdata. This clearly will be placed in a metatable. Apparently, all other instances use tags simply as a type-checking mechanism.
Is there a Lua 5 construction that allows userdata to be "typed" more simply than with metatables? If not, then is the most appropriate solution to put a numeric identifier in each object's metatable?
Quick aside: the new documentation for "lua_error" shows the old style prototype with string parameter.
Suggestion: I would like to see "lua_getn" made public again. It seems to me that many C programs use this, not just ltablib.c.