diff options
Diffstat (limited to 'src/linda.c')
-rw-r--r-- | src/linda.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linda.c b/src/linda.c index 98d2a8e..ee60ebc 100644 --- a/src/linda.c +++ b/src/linda.c | |||
@@ -46,6 +46,7 @@ THE SOFTWARE. | |||
46 | */ | 46 | */ |
47 | struct s_Linda | 47 | struct s_Linda |
48 | { | 48 | { |
49 | DeepPrelude prelude; // Deep userdata MUST start with this header | ||
49 | SIGNAL_T read_happened; | 50 | SIGNAL_T read_happened; |
50 | SIGNAL_T write_happened; | 51 | SIGNAL_T write_happened; |
51 | Universe* U; // the universe this linda belongs to | 52 | Universe* U; // the universe this linda belongs to |
@@ -794,6 +795,7 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
794 | s = (struct s_Linda*) malloc( sizeof(struct s_Linda) + name_len); // terminating 0 is already included | 795 | s = (struct s_Linda*) malloc( sizeof(struct s_Linda) + name_len); // terminating 0 is already included |
795 | if( s) | 796 | if( s) |
796 | { | 797 | { |
798 | s->prelude.magic.value = DEEP_VERSION.value; | ||
797 | SIGNAL_INIT( &s->read_happened); | 799 | SIGNAL_INIT( &s->read_happened); |
798 | SIGNAL_INIT( &s->write_happened); | 800 | SIGNAL_INIT( &s->write_happened); |
799 | s->U = universe_get( L); | 801 | s->U = universe_get( L); |
@@ -895,8 +897,7 @@ static void* linda_id( lua_State* L, DeepOp op_) | |||
895 | push_unique_key( L, NIL_SENTINEL); | 897 | push_unique_key( L, NIL_SENTINEL); |
896 | lua_setfield(L, -2, "null"); | 898 | lua_setfield(L, -2, "null"); |
897 | 899 | ||
898 | luaG_pushdeepversion( L); | 900 | STACK_END( L, 1); |
899 | STACK_END( L, 2); | ||
900 | return NULL; | 901 | return NULL; |
901 | } | 902 | } |
902 | 903 | ||