Re: is it possible to make longjmp-free Lua?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: is it possible to make longjmp-free Lua?
- From: David Given <dg@...>
- Date: 2009年7月27日 11:15:43 +0100
Rob Kendrick wrote:
[...]
Surely setjmp/longjmp aren't affected by this; they just take a copy of
stack information, and put it back?
Sometimes you don't *have* setjmp/longjmp --- I've just done a basic
port of Lua to OpenKODE, which doesn't have those functions. Luckily,
our OpenKODE environment has a non-standard C++ extension that allows
exceptions, which means I can at least proceed.
BTW, not having anything like stdlib or stdio does make certain aspects
of the porting a... challenge. In particular, it surprised me that the
file I/O parts of Lua are mixed in with the pure logic parts; I had to
disembowel lauxlib.c quite heavily. It would be nice if we could have
all the file I/O moved into a separate file, for ease of use in
file-less embedded environments.
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan