You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When testing I spotted an issue with
tostring().
"Receives a value of any type and converts it to a string in a
human-readable format"[1].
///////////
Run:
//////////////////
for k,v in pairs(luaharfbuzz) do
print(k,v)
end
//////////////////
Should only fail if your lua, say texlua, hasn't got luaharfbuzz. Else
it should list the elements of the table.
I have a more sophisticated version of this loop that does it
recursively. So your code breaks a recursive list of _G.
//////
I did a couple of versions of the same hack: remove __tostring. Either
subsequently in lua or by commenting out in the sources.
Then the above lua works as the lua manual says it should.
But this breaks the use of tostring in some of your lua code, that
expects the returned string to be an internal value, such as language's
4 letter code.
//////////
2 obvious solutions:
* rename the function, but this probably breaks existing lua code
* fix the __tostring so that it works as the default class behaviour.
Any other better ones?
//////////////////////
[1] https://www.lua.org/manual/5.3/manual.html#pdf-tostring
//////////////////////
Simon
The text was updated successfully, but these errors were encountered:
Email from Simon Dales:
The text was updated successfully, but these errors were encountered: