lua-users home
lua-l archive

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


Hi,

A very valid question was raised on #lua this morning.

  Why is lua_setmetatable()'s return type 'int' rather than 'void'?

My own 10 second scan of the function in the 5.1 source suggests that it can
only ever return 1 and as such, should probably just be void.  This seems to
remain the case in 5.2-beta

D.

-- 
Daniel Silverstone                         http://www.digital-scurf.org/
PGP mail accepted and encouraged.            Key Id: 3CCE BABE 206C 3B69