From a2f4eb8116de4084d00d3683153a43959c56a51f Mon Sep 17 00:00:00 2001 From: blue42u Date: Thu, 20 Jul 2017 09:26:59 -0500 Subject: [PATCH] Allow non-id'd objects to be pushed. Uses less bytes, and is less buggy. --- src/ldata-read.c | 4 ++-- src/ldata-write.c | 34 +++++++--------------------------- 2 files changed, 9 insertions(+), 29 deletions(-) diff --git a/src/ldata-read.c b/src/ldata-read.c index e738bb2..0f99f0a 100644 --- a/src/ldata-read.c +++ b/src/ldata-read.c @@ -12,7 +12,7 @@ static void pushread(lua_State* L, int idtab, const void** data, const void* st) int ld_unpack(lua_State* L, const void* space) { // Header: unsigned int numobj; - // Footer: unsigned int numpush, pushids[numpush]; + // Footer: unsigned int numpush; ld_sml pushes[numpush]; int top = lua_gettop(L); const void* st = space; void* data = &space; @@ -28,7 +28,7 @@ int ld_unpack(lua_State* L, const void* space) { int tab = lua_absindex(L, -1); n = read(unsigned int); - for(int i=0; i