lua-users home
lua-l archive

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

Herewith some feedback on Lua 5w0.

To be able to do what I need to do, I have
had to make the following emendations:

 In ltm.c
   in const char *const luaT_typenames[]
   change the second occurrence of 'userdata',
   i.e. luaT_typenames[6],to something else.
   Let us say to 'userpointer', temporarily,
   for want of an official nomenclature.
   I need to be able to distinguish userdata from
   userpointers, and it makes no sense for the
   function 'type' to return the same value for both.  

 It might be easier for users if the API treated
 the two sorts of 'userdata' separately and equally
 without the pretence that they are somehow the same.
 So provide a macro 'lua_isuserpointer(L,n)' in lua.h
 to match 'lua_isuserdata(L,n)' and separate
 'lua_touserdata' into two separate functions,
 the other 'lua_touserpointer'.

Of course, even the inexpert user like myself can
make these changes, wrapped up in #ifdefs, but it
would all look smoother if it were part of the official

By the way, everything compiles straightaway,
as I have come to expect.  
Gavin Wraith (
Home page: