~ubuntu-branches/ubuntu/precise/lua5.2/precise-security

« back to all changes in this revision

Viewing changes to doc/readme.html

  • Committer: Package Import Robot
  • Author(s): Enrico Tassi
  • Date: 2011-12-07 18:40:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20111207184043-0r0wvv6p48zah403
Tags: 5.2.0~rc5-1
* Do not link against ncurses (patch by Sven Joachim) (Closes: #646165) 
* Include manpages (Closes: #636149) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
7
7
<STYLE TYPE="text/css">
8
8
blockquote, .display {
9
 
        color: black ;
10
 
        padding: 8px ;
11
9
        border: solid #a0a0a0 2px ;
12
 
        xbackground-color: #EFEFFF ;
13
 
        margin-left: 0px ;
 
10
        padding: 1em ;
 
11
        margin: 0px ;
 
12
}
 
13
 
 
14
.display {
 
15
        word-spacing: 0.25em ;
 
16
}
 
17
 
 
18
dl.display dd {
 
19
        padding-bottom: 0.2em ;
14
20
}
15
21
 
16
22
tt, kbd, code {
17
 
        font-size: 120% ;
18
 
        xcolor: black ;
19
 
        xpadding: 4px ;
20
 
        xbackground-color: #E0E0E0 ;
 
23
        font-size: 12pt ;
21
24
}
22
25
</STYLE>
23
26
</HEAD>
27
30
<HR>
28
31
<H1>
29
32
<A HREF="http://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua" BORDER=0></A>
30
 
Welcome to Lua 5.2 (beta)
 
33
Welcome to Lua 5.2
31
34
</H1>
32
35
 
33
36
<P>
34
 
<IMG SRC="alert.png" ALIGN="absbottom" ALT="[!]">
35
 
<EM>This is a beta version of Lua 5.2.
36
 
Some details may change in the final version.</EM>
37
 
 
38
 
<P>
39
37
<A HREF="#about">about</A>
40
38
&middot;
41
39
<A HREF="#install">installation</A>
86
84
You need to build it before using it.
87
85
Building Lua should be straightforward
88
86
because
89
 
Lua is implemented in pure ANSI C, and compiles unmodified in all known
 
87
Lua is implemented in pure ANSI C and compiles unmodified in all known
90
88
platforms that have an ANSI C compiler.
91
89
Lua also compiles unmodified as C++.
92
90
The instructions given below for building Lua are for Unix-like platforms.
120
118
<OL>
121
119
<LI>
122
120
Open a terminal window and move to
123
 
the top-level directory, which is named lua-5.2.0.
 
121
the top-level directory, which is named <TT>lua-5.2.0</TT>.
124
122
The Makefile there controls both the build process and the installation process.
125
123
<P>
126
124
<LI>
127
125
  Do "<KBD>make</KBD>" and see if your platform is listed.
128
126
  The platforms currently supported are:
129
 
<BLOCKQUOTE>
130
 
    aix ansi bsd freebsd generic linux macosx mingw posix solaris
131
 
</BLOCKQUOTE>
 
127
<P>
 
128
<P CLASS="display">
 
129
   aix ansi bsd freebsd generic linux macosx mingw posix solaris
 
130
</P>
132
131
<P>
133
132
  If your platform is listed, just do "<KBD>make xxx</KBD>", where xxx
134
133
  is your platform name.
138
137
<P>
139
138
<LI>
140
139
The compilation takes only a few moments
141
 
and produces three files in the src directory:
 
140
and produces three files in the <TT>src</TT> directory:
142
141
lua (the interpreter),
143
142
luac (the compiler),
144
143
and liblua.a (the library).
147
146
  To check that Lua has been built correctly, do "<KBD>make test</KBD>"
148
147
  after building Lua. This will run the interpreter and print its version string.
149
148
</OL>
 
149
<P>
 
150
If you're running Linux and get compilation errors,
 
151
make sure you have installed the <TT>readline</TT> development package.
150
152
 
151
153
<H3>Installing Lua</H3>
152
154
<P>
153
155
  Once you have built Lua, you may want to install it in an official
154
156
  place in your system. In this case, do "<KBD>make install</KBD>". The official
155
 
  place and the way to install files are defined in Makefile. You'll
 
157
  place and the way to install files are defined in the Makefile. You'll
156
158
  probably need the right permissions to install files.
157
159
 
158
160
<P>
198
200
<P>
199
201
  Three kinds of things can be customized by editing a file:
200
202
<UL>
201
 
    <LI> Where and how to install Lua &mdash; edit Makefile.
202
 
    <LI> How to build Lua &mdash; edit src/Makefile.
203
 
    <LI> Lua features &mdash; edit src/luaconf.h.
 
203
    <LI> Where and how to install Lua &mdash; edit <TT>Makefile</TT>.
 
204
    <LI> How to build Lua &mdash; edit <TT>src/Makefile</TT>.
 
205
    <LI> Lua features &mdash; edit <TT>src/luaconf.h</TT>.
204
206
</UL>
205
207
 
206
208
<P>
211
213
 
212
214
<P>
213
215
  On the other hand, if you need to customize some Lua features, you'll need
214
 
  to edit src/luaconf.h before building and installing Lua.
 
216
  to edit <TT>src/luaconf.h</TT> before building and installing Lua.
215
217
  The edited file will be the one installed, and
216
218
  it will be used by any Lua clients that you build, to ensure consistency.
217
219
  Further customization is available to experts by editing the Lua sources.
218
220
 
219
221
<P>
220
 
  We strongly recommend that you enable dynamic loading in src/luaconf.h.
 
222
  We strongly recommend that you enable dynamic loading in <TT>src/luaconf.h</TT>.
221
223
  This is done automatically for all platforms listed above that have
222
224
  this feature and also for Windows.
223
225
 
238
240
ltm.c lundump.c lvm.c lzio.c
239
241
lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c
240
242
lmathlib.c loslib.c lstrlib.c ltablib.c loadlib.c linit.c
241
 
 
242
243
<DT>
243
244
interpreter:
244
245
<DD>
257
258
  those dynamic libraries &mdash; but <EM>don't</EM> link the Lua library
258
259
  into each dynamic library. For Unix, we recommend that the Lua library
259
260
  be linked statically into the host program and its symbols exported for
260
 
  dynamic linking; src/Makefile does this for the Lua interpreter.
 
261
  dynamic linking; <TT>src/Makefile</TT> does this for the Lua interpreter.
261
262
  For Windows, we recommend that the Lua library be a DLL.
262
263
 
263
264
<P>
264
 
  As mentioned above, you may edit src/luaconf.h to customize
 
265
  As mentioned above, you may edit <TT>src/luaconf.h</TT> to customize
265
266
  some features before building Lua.
266
267
 
267
268
<H2><A NAME="changes">Changes since Lua 5.1</A></H2>
290
291
<UL>
291
292
<LI> no more fenv for threads or functions
292
293
<LI> tables honor the <CODE>__len</CODE> metamethod
293
 
<LI> hex and <CODE>\*</CODE> escapes in strings
 
294
<LI> hex and <CODE>\z</CODE> escapes in strings
294
295
<LI> support for hexadecimal floats
295
296
<LI> order metamethods work for different types
296
297
<LI> no more verification of opcode consistency
302
303
<H3>Libraries</H3>
303
304
<UL>
304
305
<LI> arguments for function called through <CODE>xpcall</CODE>
305
 
<LI> optional 'mode' argument to load (to control binary x text)
306
 
<LI> optional 'env' argument to load (environment for loaded chunk)
 
306
<LI> optional 'mode' argument to load and loadfile (to control binary x text)
 
307
<LI> optional 'env' argument to load and loadfile (environment for loaded chunk)
307
308
<LI> <CODE>loadlib</CODE> may load libraries with global names (RTLD_GLOBAL)
308
309
<LI> new function <CODE>package.searchpath</CODE>
309
310
<LI> modules receive their paths when loaded
324
325
<H3>C API</H3>
325
326
<UL>
326
327
<LI> main thread predefined in the registry
327
 
<LI> new constants <CODE>LUA_OK</CODE> and <CODE>LUA_ERRGCMM</CODE>
328
 
<LI> new <CODE>lua_compare</CODE>, <CODE>lua_arith</CODE>, and <CODE>lua_len</CODE>
329
 
<LI> new <CODE>lua_version</CODE> and <CODE>luaL_checkversion</CODE>
 
328
<LI> new functions
 
329
<CODE>lua_absindex</CODE>,
 
330
<CODE>lua_arith</CODE>,
 
331
<CODE>lua_compare</CODE>,
 
332
<CODE>lua_copy</CODE>,
 
333
<CODE>lua_len</CODE>,
 
334
<CODE>lua_rawgetp</CODE>,
 
335
<CODE>lua_rawsetp</CODE>,
 
336
<CODE>lua_upvalueid</CODE>,
 
337
<CODE>lua_upvaluejoin</CODE>,
 
338
<CODE>lua_version</CODE>.
 
339
<LI> new functions
 
340
<CODE>luaL_checkversion</CODE>,
 
341
<CODE>luaL_setmetatable</CODE>,
 
342
<CODE>luaL_testudata</CODE>,
 
343
<CODE>luaL_tolstring</CODE>.
330
344
<LI> <CODE>lua_pushstring</CODE> and <CODE>pushlstring</CODE> return string
331
 
<LI> new <CODE>luaL_testudata</CODE> and <CODE>luaL_setmetatable</CODE>
332
 
<LI> new <CODE>luaL_tolstring</CODE>
333
 
<LI> new <CODE>lua_copy</CODE>
334
 
<LI> new <CODE>lua_absindex</CODE>
335
 
<LI> new <CODE>lua_upvalueid</CODE> and <CODE>lua_upvaluejoin</CODE>
336
345
<LI> <CODE>nparams</CODE> and <CODE>isvararg</CODE> available in debug API
337
346
<LI> new <CODE>lua_Unsigned</CODE>
338
347
</UL>
340
349
<H3>Implementation</H3>
341
350
<UL>
342
351
<LI> max constants per function raised to 2<SUP>26</SUP>
 
352
<LI> generational mode for garbage collection (experimental)
 
353
<LI> NaN trick (experimental)
343
354
<LI> internal (immutable) version of ctypes
344
355
<LI> simpler implementation for string buffers
345
 
<LI> udata with finalizers are kept in a separated list for the GC
346
 
<LI> <CODE>CallInfo</CODE> stack now is a linked list
347
356
<LI> parser uses much less C-stack space (no more auto arrays)
348
 
<LI> new hash for floats
349
 
<LI> handling of non-string error messages in the standalone interpreter
350
 
<LI> generational mode for garbage collection (experimental)
351
 
<LI> NaN trick (experimental)
 
357
</UL>
 
358
 
 
359
<H3>Lua standalone interpreter</H3>
 
360
<UL>
 
361
<LI> new <CODE>-E</CODE> option to avoid environment variables
 
362
<LI> handling of non-string error messages
352
363
</UL>
353
364
 
354
365
<H2><A NAME="license">License</A></H2>
369
380
For details, see
370
381
<A HREF="http://www.lua.org/license.html">this</A>.
371
382
 
372
 
<BLOCKQUOTE>
 
383
<BLOCKQUOTE STYLE="padding-bottom: 0em">
373
384
Copyright &copy; 1994&ndash;2011 Lua.org, PUC-Rio.
374
385
 
375
386
<P>
393
404
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
394
405
THE SOFTWARE.
395
406
</BLOCKQUOTE>
 
407
<P>
396
408
 
397
409
<HR>
398
410
<SMALL CLASS="footer">
399
411
Last update:
400
 
Fri Jun 24 11:30:57 BRT 2011
 
412
Wed Nov 23 16:17:22 BRST 2011
401
413
</SMALL>
402
414
<!--
403
 
Last change: revised for Lua 5.2.0 (beta)
 
415
Last change: revised for Lua 5.2.0
404
416
-->
405
417
 
406
418
</BODY>