lua_tostring surprise
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: lua_tostring surprise
- From: John Belmonte <john@...>
- Date: 2006年1月14日 15:02:34 -0500
Today I was surprised to find that while base lib tostring honors the
metatable __tostring field, lua_tostring in the C API doesn't
(lua-5.1-rc). This renders __tostring mostly useless.
More immediately, it would be nice if report() in lua.c attempted to
call tostring via Lua in order to honor __tostring. I'd like to use
tables as exception objects, but still have them print a nice message
when one goes unhandled.
--John