lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

At 18:57 -0300 on 24-04-00, Luiz Henrique de Figueiredo wrote:

Lua 4.0 (alpha) is now available for downloading at

The other mirrors will be updated soon, hopefully.

The distribution includes an updated reference manual in HTML.
The PostScript and PDF versions in the site are still for version 3.2.

* New in version 4.0 (alpha)
  + the API is now fully re-entrant.
  + new "break" and "for" statements.
  + cleaner virtual machine -- at least 20% faster.
  + reduced memory usage.
  + code now compiles unmodified as both ANSI C and C++.
  + improved debug API.
  and more!

To use the new API, you need to do
	#include "lua.h"

The old API is enabled by default as macros in lua.h.
Existing C code that use Lua should compile without change.
Please report any problems to


I have now built a PowerMac Lua 4.0 (alpha) application, and that was really easy. The only warning that CodeWarrior Pro 5 gave me, was about some possibly superfluous ";" at the end of a simple while line, which I ignored.

As I tried to run one of my bigger scripts, I got the "error: read patterns are deprecated" message. My script used read(fileRef, "....") to read four bytes. I've found
   #define read_pattern(L, f, p) (lua_error(L, ...
in the file liolib.c, but can somebody please tell me what to do with this line to enable the old read patterns ...?

Would it be possible to put a "read pattern switch" at the run-time level? (It's rather clumsy to have to build two kinds of applications.)


Jon Kleiser / ADB-seksjonen / USIT / University of Oslo / Norway
Mail: / Tel: +47-22 85 28 04 / Fax: +47-22 85 29 70