[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Enigma-devel] Re: network 2-player game
From: |
Tacvek |
Subject: |
Re: [Enigma-devel] Re: network 2-player game |
Date: |
Tue, 21 Mar 2006 21:40:26 -0500 |
My previous message answeing this question was somewhat unclear.
I'm not sure what effect the error change would have on the levels. If any
level attempts
to check to errors using "call" then then they sould upgrade to "pcall".
_LASTERROR will no longer
be available.
Actually I kept _LASTERROR because it was actually simpler to do so.
Anyway, My port of enigma to 5.1 is currently working, although I'm
concerned about the userdata related code.
I wanted to be able to run an actual Enigma level before releasing the
patch, but I've run into
the "%" upvale problem in startup.lua, and expect to continue hitting that
error.
So I'll explain my concern about userdata: In Lua 5, userdata can hold
arbitrary data. However, I only had a pointer. So I stored the pointer as
the data. The problem is that the functions to retrive the userdata will now
return a pointer pointing to my pointer, which then points to the object.
The existing code *might*only be dereferncing one pointer, although the
existing code may be fine due to the changes found in tolua 5 (on which
tolua++ is based).
So I'll cleanup the patch (some) and publish it in the next day or two.
It will be based on revision 99.
Ideally other patches would be put on hold, This patch applied, Some patches
cleaning up some messiness of this patch (inconsitant indetation etc.be
applied, patches to the lua files to update them to lua 5.1 be applied, and
then resuming regular development.
The reason for that would be because even a small change to the current
source could break the patch.
Of course, that decision is up to the actual developers.
(Note my patch would neglect things like the changelog entries but
compaired to the relative difficulty of changing the c code, that would be
easy for somebody else to supply on my behalf. I will also likely need to
switch to tolua++ to be able to support Lua 5.1).