From 8d50122af03aec0c5271471f95798a5c98f30378 Mon Sep 17 00:00:00 2001 From: Luiz Henrique de Figueiredo Date: Thu, 7 Nov 1996 11:59:51 -0200 Subject: replaced unions by memcpy --- undump.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/undump.c b/undump.c index eb8e6634..2d08f811 100644 --- a/undump.c +++ b/undump.c @@ -3,7 +3,7 @@ ** load bytecodes from files */ -char* rcs_undump="$Id: undump.c,v 1.13 1996/03/12 20:00:40 lhf Exp lhf $"; +char* rcs_undump="$Id: undump.c,v 1.14 1996/03/14 17:31:15 lhf Exp $"; #include #include @@ -142,13 +142,14 @@ static void Unthread(Byte* code, int i, int v) { while (i!=0) { - CodeWord c; + Word w; Byte* p=code+i; - get_word(c,p); - i=c.w; - c.w=v; - p[-2]=c.m.c1; - p[-1]=c.m.c2; + Byte* c=&w; + get_word(w,p); + i=w; + w=v; + p[-2]=c[0]; + p[-1]=c[1]; } } @@ -208,13 +209,9 @@ static void LoadFunction(FILE* D) } else /* fix PUSHFUNCTION */ { - CodeCode c; - Byte* p; tf->marked=LoadWord(D); tf->fileName=Main->fileName; - p=Main->code+tf->marked; - c.tf=tf; - *p++=c.m.c1; *p++=c.m.c2; *p++=c.m.c3; *p++=c.m.c4; + memcpy(Main->code+tf->marked,&tf,sizeof(tf)); lastF=lastF->next=tf; } tf->code=LoadBlock(tf->size,D); -- cgit v1.2.3-55-g6feb