1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-20 19:27:22 +03:00
wezterm/luahelper
Wez Furlong 4161e67f60 lua: implicit tostring(userdata) when printing and ToDynamic
I've been holding off from using UserData wrappers around things
because it is awkward to match them up with the To/FromDynamic
conversion.

This commit aims to help with that by implicitly calling the
tostring metamethod (if present) on a userdata both when printing
(so the values look reasonable in the repl) and when mapping a lua
value to a dynamic value.

Provided that the end type is try_from=String this will allow
the userdata value to be assigned as table value.
2022-07-10 21:19:10 -07:00
..
src lua: implicit tostring(userdata) when printing and ToDynamic 2022-07-10 21:19:10 -07:00
Cargo.toml Add cycle detection when converting lua values to dynamic 2022-05-18 07:47:39 -07:00