aboutsummaryrefslogtreecommitdiff
path: root/luaconf.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 /luaconf.h
parentf99509581ee73c1c2dbddb3398e87c098771d31f (diff)
downloadlua-8c8a91f2ef7acccb99e3737913faad8d48b39571.tar.gz
lua-8c8a91f2ef7acccb99e3737913faad8d48b39571.tar.bz2
lua-8c8a91f2ef7acccb99e3737913faad8d48b39571.zip
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 'luaconf.h')
-rw-r--r--luaconf.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/luaconf.h b/luaconf.h
index cc8e1bdc..126257dc 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -295,7 +295,7 @@
295*/ 295*/
296 296
297/* 297/*
298@@ LUA_COMPAT_5_3 controls other macros for compatibility with Lua 5.2. 298@@ LUA_COMPAT_5_3 controls other macros for compatibility with Lua 5.3.
299** You can define it to get all options, or change specific options 299** You can define it to get all options, or change specific options
300** to fit your specific needs. 300** to fit your specific needs.
301*/ 301*/
@@ -316,6 +316,12 @@
316*/ 316*/
317#define LUA_COMPAT_APIINTCASTS 317#define LUA_COMPAT_APIINTCASTS
318 318
319/*
320@@ LUA_COMPAT_LT_LE controls the emulation of the '__le' metamethod
321** using '__lt'.
322*/
323#define LUA_COMPAT_LT_LE
324
319#endif /* } */ 325#endif /* } */
320 326
321 327