diff options
| author | Benoit Germain <bnt period germain arrobase gmail period com> | 2017-06-05 11:25:31 +0200 |
|---|---|---|
| committer | Benoit Germain <bnt period germain arrobase gmail period com> | 2017-06-05 11:25:31 +0200 |
| commit | c2ca1fce531e29f8209660b18ef0a493722813f1 (patch) | |
| tree | 3afa59fb910b2aaee79cbccc9a58fc961b3b8868 /docs | |
| parent | 0ede50e2da00f2915ceb50184425c42bda83adfd (diff) | |
| download | lanes-c2ca1fce531e29f8209660b18ef0a493722813f1.tar.gz lanes-c2ca1fce531e29f8209660b18ef0a493722813f1.tar.bz2 lanes-c2ca1fce531e29f8209660b18ef0a493722813f1.zip | |
Table transfer improvements
* new API function lanes.register( "name", module) to manually register
a module table after it was required
* Transfering registered module tables will link the equivalent in the
destination state instead of cloning it
* bumped version to 3.11
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/index.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/index.html b/docs/index.html index 154355d..1eb1d71 100644 --- a/docs/index.html +++ b/docs/index.html | |||
| @@ -64,13 +64,13 @@ | |||
| 64 | <font size="-1"> | 64 | <font size="-1"> |
| 65 | <p> | 65 | <p> |
| 66 | <br/> | 66 | <br/> |
| 67 | <i>Copyright © 2007-16 Asko Kauppi, Benoit Germain. All rights reserved.</i> | 67 | <i>Copyright © 2007-17 Asko Kauppi, Benoit Germain. All rights reserved.</i> |
| 68 | <br/> | 68 | <br/> |
| 69 | Lua Lanes is published under the same <a href="http://en.wikipedia.org/wiki/MIT_License">MIT license</a> as Lua 5.1, 5.2, and 5.3. | 69 | Lua Lanes is published under the same <a href="http://en.wikipedia.org/wiki/MIT_License">MIT license</a> as Lua 5.1, 5.2, and 5.3. |
| 70 | </p> | 70 | </p> |
| 71 | 71 | ||
| 72 | <p> | 72 | <p> |
| 73 | This document was revised on 21-Nov-16, and applies to version <tt>3.10.1</tt>. | 73 | This document was revised on 5-Jun-17, and applies to version <tt>3.11</tt>. |
| 74 | </p> | 74 | </p> |
| 75 | </font> | 75 | </font> |
| 76 | </center> | 76 | </center> |
| @@ -396,12 +396,15 @@ | |||
| 396 | (Since v3.5.0) Once Lanes is configured, one should register with Lanes the modules exporting functions that will be transferred either during lane generation or through <a href="#lindas">lindas</a>. | 396 | (Since v3.5.0) Once Lanes is configured, one should register with Lanes the modules exporting functions that will be transferred either during lane generation or through <a href="#lindas">lindas</a>. |
| 397 | <br/> | 397 | <br/> |
| 398 | Use <tt>lanes.require()</tt> for this purpose. This will call the original <tt>require()</tt>, then add the result to the lookup databases. | 398 | Use <tt>lanes.require()</tt> for this purpose. This will call the original <tt>require()</tt>, then add the result to the lookup databases. |
| 399 | <br/> | ||
| 400 | (Since version 3.11) It is also possible to register a given module with <tt>lanes.register()</tt>. This function will raise an error if the registered module is not a function or table. | ||
| 399 | </p> | 401 | </p> |
| 400 | 402 | ||
| 401 | <table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%"> | 403 | <table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%"> |
| 402 | <tr> | 404 | <tr> |
| 403 | <td> | 405 | <td> |
| 404 | <pre> local m = lanes.require "modname"</pre> | 406 | <pre> local m = lanes.require "modname"</pre> |
| 407 | <pre> lanes.register( "modname", module)</pre> | ||
| 405 | </td> | 408 | </td> |
| 406 | </tr> | 409 | </tr> |
| 407 | </table> | 410 | </table> |
