Re: preserving the relationship between upvalues of serialized functions in LuaJIT 2

  • From: Mike Pall <mike-1206@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 15 Jun 2012 15:14:15 +0200

Zach Devito wrote:
> > [BTW: Why didn't you use the API names from Lua 5.2?]
> 
> I didn't realize they were added to Lua 5.2, no reason I can't
> use those names.

Yes, I guess it would be better to use the 5.2 API names.

Not sure I should add these Lua 5.2 extensions to the Lua/C
interface to the LuaJIT core, though.

I mean ... it's upwards-compatible, since those C functions don't
exist in the Lua 5.1 API. So it wouldn't break compatibility with
the Lua 5.1 ABI, which is important for distros.

OTOH the C ABI as presented by LuaJIT 2.0 would then have a mix of
5.1 and 5.2 features. The mix is less of a problem with pure Lua
functions, as you can test for these at runtime. But for C it's
more a matter of build or break.

I'm not even sure it should be there if you enable Lua 5.2
compatibility (-DLUAJIT_ENABLE_LUA52COMPAT). That has more an
effect on the language or libraries and not on the Lua/C API. It
would be hard to support the full 5.1 and 5.2 C API in parallel
(and not very useful right now).

Anyway, I'm undecided on this part. Opinions welcome!

--Mike

Other related posts: