| @@ -33,7 +33,7 @@ Freely available under the terms of the · 32 unmodified lines |
| 33 | <!-- ====================================================================== --> | 33 | <!-- ====================================================================== --> |
| 34 | <p> | 34 | <p> |
| 35 | | 35 | |
| 36 | <!-- $Id: manual.of,v 1.93 2011/12/08 12:12:34 roberto Exp $ --> | 36 | <!-- $Id: manual.of,v 1.94 2011/12/12 15:26:26 roberto Exp $ --> |
| 37 | | 37 | |
| 38 | | 38 | |
| 39 | | 39 | |
| @@ -2745,7 +2745,7 @@ Lua raises an error whenever it tries to yield across an API call, · 2705 unmodified lines |
| 2745 | except for three functions: | 2745 | except for three functions: |
| 2746 | <a href="#lua_yieldk"><code>lua_yieldk</code></a>, <a href="#lua_callk"><code>lua_callk</code></a>, and <a href="#lua_pcallk"><code>lua_pcallk</code></a>. | 2746 | <a href="#lua_yieldk"><code>lua_yieldk</code></a>, <a href="#lua_callk"><code>lua_callk</code></a>, and <a href="#lua_pcallk"><code>lua_pcallk</code></a>. |
| 2747 | All those functions receive a <em>continuation function</em> | 2747 | All those functions receive a <em>continuation function</em> |
| 2748 | (as a parameter called <code>k</code>) to continue execution after an yield. | 2748 | (as a parameter called <code>k</code>) to continue execution after a yield. |
| 2749 | | 2749 | |
| 2750 | | 2750 | |
| 2751 | <p> | 2751 | <p> |
| @@ -3371,7 +3371,7 @@ but instead may call the continuation function. · 619 unmodified lines |
| 3371 | In that case, a call to <a href="#lua_getctx"><code>lua_getctx</code></a> will return the error code | 3371 | In that case, a call to <a href="#lua_getctx"><code>lua_getctx</code></a> will return the error code |
| 3372 | (the value that would be returned by <a href="#lua_pcallk"><code>lua_pcallk</code></a>); | 3372 | (the value that would be returned by <a href="#lua_pcallk"><code>lua_pcallk</code></a>); |
| 3373 | the value of <code>ctx</code> will be set to the context information, | 3373 | the value of <code>ctx</code> will be set to the context information, |
| 3374 | as in the case of an yield. | 3374 | as in the case of a yield. |
| 3375 | | 3375 | |
| 3376 | | 3376 | |
| 3377 | | 3377 | |
| @@ -6741,7 +6741,8 @@ To have access to these libraries, · 3363 unmodified lines |
| 6741 | the C host program should call the <a href="#luaL_openlibs"><code>luaL_openlibs</code></a> function, | 6741 | the C host program should call the <a href="#luaL_openlibs"><code>luaL_openlibs</code></a> function, |
| 6742 | which opens all standard libraries. | 6742 | which opens all standard libraries. |
| 6743 | Alternatively, | 6743 | Alternatively, |
| 6744 | it can open them individually by calling | 6744 | the host program can open them individually by using |
| | 6745 | <a href="#luaL_requiref"><code>luaL_requiref</code></a> to call |
| 6745 | <a name="pdf-luaopen_base"><code>luaopen_base</code></a> (for the basic library), | 6746 | <a name="pdf-luaopen_base"><code>luaopen_base</code></a> (for the basic library), |
| 6746 | <a name="pdf-luaopen_package"><code>luaopen_package</code></a> (for the package library), | 6747 | <a name="pdf-luaopen_package"><code>luaopen_package</code></a> (for the package library), |
| 6747 | <a name="pdf-luaopen_coroutine"><code>luaopen_coroutine</code></a> (for the coroutine library), | 6748 | <a name="pdf-luaopen_coroutine"><code>luaopen_coroutine</code></a> (for the coroutine library), |
| @@ -6752,10 +6753,7 @@ it can open them individually by calling · 4 unmodified lines |
| 6752 | <a name="pdf-luaopen_io"><code>luaopen_io</code></a> (for the I/O library), | 6753 | <a name="pdf-luaopen_io"><code>luaopen_io</code></a> (for the I/O library), |
| 6753 | <a name="pdf-luaopen_os"><code>luaopen_os</code></a> (for the Operating System library), | 6754 | <a name="pdf-luaopen_os"><code>luaopen_os</code></a> (for the Operating System library), |
| 6754 | and <a name="pdf-luaopen_debug"><code>luaopen_debug</code></a> (for the debug library). | 6755 | and <a name="pdf-luaopen_debug"><code>luaopen_debug</code></a> (for the debug library). |
| 6755 | These functions are declared in <a name="pdf-lualib.h"><code>lualib.h</code></a> | 6756 | These functions are declared in <a name="pdf-lualib.h"><code>lualib.h</code></a>. |
| 6756 | and should not be called directly: | | |
| 6757 | you must call them like any other Lua C function, | | |
| 6758 | e.g., by using <a href="#lua_call"><code>lua_call</code></a>. | | |
| 6759 | | 6757 | |
| 6760 | | 6758 | |
| 6761 | | 6759 | |
| @@ -9986,10 +9984,11 @@ Otherwise, <code>lua</code> executes the string itself. · 3224 unmodified lines |
| 9986 | <p> | 9984 | <p> |
| 9987 | When called with option <code>-E</code>, | 9985 | When called with option <code>-E</code>, |
| 9988 | besides ignoring <code>LUA_INIT</code>, | 9986 | besides ignoring <code>LUA_INIT</code>, |
| 9989 | the interpreter also resets the values of | 9987 | Lua also ignores |
| | 9988 | the values of <code>LUA_PATH</code> and <code>LUA_CPATH</code>, |
| | 9989 | setting the values of |
| 9990 | <a href="#pdf-package.path"><code>package.path</code></a> and <a href="#pdf-package.cpath"><code>package.cpath</code></a> | 9990 | <a href="#pdf-package.path"><code>package.path</code></a> and <a href="#pdf-package.cpath"><code>package.cpath</code></a> |
| 9991 | with the default paths defined in <code>luaconf.h</code>, | 9991 | with the default paths defined in <code>luaconf.h</code>. |
| 9992 | in effect ignoring the values of <code>LUA_PATH</code> and <code>LUA_CPATH</code>. | | |
| 9993 | | 9992 | |
| 9994 | | 9993 | |
| 9995 | <p> | 9994 | <p> |
| @@ -10291,6 +10290,11 @@ Function <a href="#lua_load"><code>lua_load</code></a> has an extra parameter, < · 295 unmodified lines |
| 10291 | Pass <code>NULL</code> to simulate the old behavior. | 10290 | Pass <code>NULL</code> to simulate the old behavior. |
| 10292 | </li> | 10291 | </li> |
| 10293 | | 10292 | |
| | 10293 | <li> |
| | 10294 | Function <a href="#lua_resume"><code>lua_resume</code></a> has an extra parameter, <code>from</code>. |
| | 10295 | Pass <code>NULL</code> or the thread doing the call. |
| | 10296 | </li> |
| | 10297 | |
| 10294 | </ul> | 10298 | </ul> |
| 10295 | | 10299 | |
| 10296 | | 10300 | |
| @@ -10383,7 +10387,7 @@ Here is the complete syntax of Lua in extended BNF. · 86 unmodified lines |
| 10383 | <HR> | 10387 | <HR> |
| 10384 | <SMALL CLASS="footer"> | 10388 | <SMALL CLASS="footer"> |
| 10385 | Last update: | 10389 | Last update: |
| 10386 | Thu Dec 8 10:36:53 BRST 2011 | 10390 | Mon Dec 12 15:21:08 BRST 2011 |
| 10387 | </SMALL> | 10391 | </SMALL> |
| 10388 | <!-- | 10392 | <!-- |
| 10389 | Last change: revised for Lua 5.2.0 | 10393 | Last change: revised for Lua 5.2.0 |