summaryrefslogtreecommitdiff
path: root/ltests.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-08-24 10:17:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-08-24 10:17:54 -0300
commit8c8a91f2ef7acccb99e3737913faad8d48b39571 (patch)
tree0807151944b7f7fd00eedfcfe94b4ee26fe25b21 /ltests.h
parentf99509581ee73c1c2dbddb3398e87c098771d31f (diff)
downloadlua-github-8c8a91f2ef7acccb99e3737913faad8d48b39571.tar.gz
Deprecated the emulation of '__le' using '__lt'
As hinted in the manual for Lua 5.3, the emulation of the metamethod for '__le' using '__le' has been deprecated. It is slow, complicates the logic, and it is easy to avoid this emulation by defining a proper '__le' function. Moreover, often this emulation was used wrongly, with a programmer assuming that an order is total when it is not (e.g., NaN in floating-point numbers).
Diffstat (limited to 'ltests.h')
-rw-r--r--ltests.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/ltests.h b/ltests.h
index 54bc4f5f..d44974a4 100644
--- a/ltests.h
+++ b/ltests.h
@@ -13,6 +13,7 @@
/* test Lua with compatibility code */
#define LUA_COMPAT_MATHLIB
+#define LUA_COMPAT_LT_LE
#define LUA_DEBUG