aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2015-04-29 12:26:34 +0200
committerPhilipp Janda <siffiejoe@gmx.net>2015-04-29 12:26:34 +0200
commitc87038c1f3a6d3a21d14d6db1affbf879a25386a (patch)
tree0bbdb4925e1c47185b32f5e678a1265b80e69862 /README.md
parentec5331cb94f9100fe4cf26d1ea215dd66e8e185c (diff)
parent17fdace5c04486db3470fe7022aee7eac8efc3af (diff)
downloadlua-compat-5.3-c87038c1f3a6d3a21d14d6db1affbf879a25386a.tar.gz
lua-compat-5.3-c87038c1f3a6d3a21d14d6db1affbf879a25386a.tar.bz2
lua-compat-5.3-c87038c1f3a6d3a21d14d6db1affbf879a25386a.zip
Merge branch 'isolated'
Conflicts: README.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8f45ccb..93bc4c8 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,22 @@ string packing modules automatically. If unsuccessful, pure Lua
42versions of the new `table` functions are used as a fallback, and 42versions of the new `table` functions are used as a fallback, and
43[Roberto's struct library][1] is tried for string packing. 43[Roberto's struct library][1] is tried for string packing.
44 44
45#### Lua submodules
46
47```lua
48local _ENV = require("compat53.module")
49if setfenv then setfenv(1, _ENV) end
50```
51
52The `compat53.module` module does not modify the global environment,
53and so it is safe to use in modules without affecting other Lua files.
54It is supposed to be set as the current environment (see above), i.e.
55cherry picking individual functions from this module is expressly
56*not* supported!). Not all features are available when using this
57module (e.g. yieldable (x)pcall support, string/file methods, etc.),
58so it is recommended to use plain `require("compat53")` whenever
59possible.
60
45### C code 61### C code
46 62
47There are two ways of adding the C API compatibility functions/macros to 63There are two ways of adding the C API compatibility functions/macros to
@@ -67,7 +83,7 @@ your project:
67 5.3 sources or from the `struct` module. (`struct` is not 100% 83 5.3 sources or from the `struct` module. (`struct` is not 100%
68 compatible to Lua 5.3's string packing!) (See [here][4]) 84 compatible to Lua 5.3's string packing!) (See [here][4])
69* `math.maxinteger` and `math.mininteger`, `math.tointeger`, `math.type`, 85* `math.maxinteger` and `math.mininteger`, `math.tointeger`, `math.type`,
70 and `math.ult` (See [here][5]) 86 and `math.ult` (see [here][5])
71* `ipairs` respects `__index` metamethod 87* `ipairs` respects `__index` metamethod
72* `table.move` 88* `table.move`
73* `table` library respects metamethods 89* `table` library respects metamethods