ilua: eliminate the "_" holds last executed command feature
the ilua `_pretty_print` feature has the property that it sets _ to be what was printed, as an interpreter feature so that _ represents the results of the previous expression. However it appears that this may conflict with some parts of our api, for instance the _ is used to hold the return value of wesnoth.textdomain in the lua implementation of [harm_unit]. Note that there is no actual bug that I have observed, I merely anticipate that this _ feature won't be compatible with our established gettext conventions.
This commit is contained in:
parent
2486b8ba4b
commit
017050df70
1 changed files with 0 additions and 3 deletions
|
@ -9,8 +9,6 @@
|
|||
local pretty_print_limit = 20
|
||||
local max_depth = 7
|
||||
local table_clever = true
|
||||
-- suppress strict warnings
|
||||
_ = true
|
||||
|
||||
-- imported global functions
|
||||
local sub = string.sub
|
||||
|
@ -102,7 +100,6 @@ function ilua._pretty_print(...)
|
|||
for i,val in ipairs(arg) do
|
||||
print(ilua.val2str(val))
|
||||
end
|
||||
_G['_'] = arg[1]
|
||||
end
|
||||
|
||||
--
|
||||
|
|
Loading…
Add table
Reference in a new issue