From f4d74e4df88559d293f2189e00031b0b383d5c4c Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 19 Jul 2013 12:49:08 +0000 Subject: [PATCH] Lose the 'packed' attribute on actor_t. Its members are already laid out on the natural alignment boundaries. Compilation tested with {32-bit, 64-bit} x {Lunatic, non-Lua} builds. git-svn-id: https://svn.eduke32.com/eduke32@3968 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.h | 2 +- polymer/eduke32/source/lunatic/defs.ilua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/polymer/eduke32/source/actors.h b/polymer/eduke32/source/actors.h index 7e3589573..71e3b2ec4 100644 --- a/polymer/eduke32/source/actors.h +++ b/polymer/eduke32/source/actors.h @@ -134,7 +134,6 @@ typedef struct { # define AC_MOVFLAGS(spr, a) ((spr)->hitag) #endif -#pragma pack(push,1) // (+ 40 16 16 4 8 6 8 6 4 20) typedef struct { int32_t t_data[10]; // 40b sometimes used to hold offsets to con code @@ -193,6 +192,7 @@ typedef struct { #endif } actor_t; +#pragma pack(push,1) // this struct needs to match the beginning of actor_t above typedef struct { int32_t t_data[10]; // 40b sometimes used to hold offsets to con code diff --git a/polymer/eduke32/source/lunatic/defs.ilua b/polymer/eduke32/source/lunatic/defs.ilua index f746d09eb..4354312ea 100644 --- a/polymer/eduke32/source/lunatic/defs.ilua +++ b/polymer/eduke32/source/lunatic/defs.ilua @@ -154,7 +154,7 @@ defs_c.bitint_new_struct_type("uint32_t", "UBit32") -- to make more 'const'), but still has array members exposed, so is unsuited -- for external exposure. local ACTOR_STRUCT = [[ -__attribute__((packed)) struct { +struct { const int32_t t_data[10]; const struct move mv; const struct action ac;