aboutsummaryrefslogtreecommitdiff
path: root/luaconf.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-27 15:47:32 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-02-27 15:47:32 -0300
commit34b00c16e28c2bbc3e633b4007de956130905ed6 (patch)
treefca960c3f8f1945a052a776722ccef4944b748fa /luaconf.h
parent12110dec0eda3813b7609051aedb0cde932fbf93 (diff)
downloadlua-34b00c16e28c2bbc3e633b4007de956130905ed6.tar.gz
lua-34b00c16e28c2bbc3e633b4007de956130905ed6.tar.bz2
lua-34b00c16e28c2bbc3e633b4007de956130905ed6.zip
removed compatibility code with older versions
Diffstat (limited to 'luaconf.h')
-rw-r--r--luaconf.h80
1 files changed, 5 insertions, 75 deletions
diff --git a/luaconf.h b/luaconf.h
index 5ed062e2..e600bbf1 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.263 2017/12/30 20:46:18 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.264 2018/02/20 20:52:50 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -295,30 +295,21 @@
295*/ 295*/
296 296
297/* 297/*
298@@ LUA_COMPAT_5_2 controls other macros for compatibility with Lua 5.2. 298@@ LUA_COMPAT_5_3 controls other macros for compatibility with Lua 5.2.
299@@ LUA_COMPAT_5_1 controls other macros for compatibility with Lua 5.1.
300** 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
301** to fit your specific needs. 300** to fit your specific needs.
302*/ 301*/
303#if defined(LUA_COMPAT_5_2) /* { */ 302#if defined(LUA_COMPAT_5_3) /* { */
304 303
305/* 304/*
306@@ LUA_COMPAT_MATHLIB controls the presence of several deprecated 305@@ LUA_COMPAT_MATHLIB controls the presence of several deprecated
307** functions in the mathematical library. 306** functions in the mathematical library.
307** (These functions were already officially removed in 5.3, but
308** nevertheless they are available by default there.)
308*/ 309*/
309#define LUA_COMPAT_MATHLIB 310#define LUA_COMPAT_MATHLIB
310 311
311/* 312/*
312@@ LUA_COMPAT_BITLIB controls the presence of library 'bit32'.
313*/
314#define LUA_COMPAT_BITLIB
315
316/*
317@@ LUA_COMPAT_IPAIRS controls the effectiveness of the __ipairs metamethod.
318*/
319#define LUA_COMPAT_IPAIRS
320
321/*
322@@ LUA_COMPAT_APIINTCASTS controls the presence of macros for 313@@ LUA_COMPAT_APIINTCASTS controls the presence of macros for
323** manipulating other integer types (lua_pushunsigned, lua_tounsigned, 314** manipulating other integer types (lua_pushunsigned, lua_tounsigned,
324** luaL_checkint, luaL_checklong, etc.) 315** luaL_checkint, luaL_checklong, etc.)
@@ -328,50 +319,6 @@
328#endif /* } */ 319#endif /* } */
329 320
330 321
331#if defined(LUA_COMPAT_5_1) /* { */
332
333/* Incompatibilities from 5.2 -> 5.3 */
334#define LUA_COMPAT_MATHLIB
335#define LUA_COMPAT_APIINTCASTS
336
337/*
338@@ LUA_COMPAT_UNPACK controls the presence of global 'unpack'.
339** You can replace it with 'table.unpack'.
340*/
341#define LUA_COMPAT_UNPACK
342
343/*
344@@ LUA_COMPAT_LOADERS controls the presence of table 'package.loaders'.
345** You can replace it with 'package.searchers'.
346*/
347#define LUA_COMPAT_LOADERS
348
349/*
350@@ macro 'lua_cpcall' emulates deprecated function lua_cpcall.
351** You can call your C function directly (with light C functions).
352*/
353#define lua_cpcall(L,f,u) \
354 (lua_pushcfunction(L, (f)), \
355 lua_pushlightuserdata(L,(u)), \
356 lua_pcall(L,1,0,0))
357
358
359/*
360@@ LUA_COMPAT_LOG10 defines the function 'log10' in the math library.
361** You can rewrite 'log10(x)' as 'log(x, 10)'.
362*/
363#define LUA_COMPAT_LOG10
364
365/*
366@@ LUA_COMPAT_LOADSTRING defines the function 'loadstring' in the base
367** library. You can rewrite 'loadstring(s)' as 'load(s)'.
368*/
369#define LUA_COMPAT_LOADSTRING
370
371/*
372@@ LUA_COMPAT_MAXN defines the function 'maxn' in the table library.
373*/
374#define LUA_COMPAT_MAXN
375 322
376/* 323/*
377@@ The following macros supply trivial compatibility for some 324@@ The following macros supply trivial compatibility for some
@@ -385,23 +332,6 @@
385#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) 332#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ)
386#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) 333#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT)
387 334
388/*
389@@ LUA_COMPAT_MODULE controls compatibility with previous
390** module functions 'module' (Lua) and 'luaL_register' (C).
391*/
392#define LUA_COMPAT_MODULE
393
394#endif /* } */
395
396
397/*
398@@ LUA_COMPAT_FLOATSTRING makes Lua format integral floats without a
399@@ a float mark ('.0').
400** This macro is not on by default even in compatibility mode,
401** because this is not really an incompatibility.
402*/
403/* #define LUA_COMPAT_FLOATSTRING */
404
405/* }================================================================== */ 335/* }================================================================== */
406 336
407 337