Explorar o código

better alignments (for 64-bit arquitectures) for structures 'Table' and
'TString'

Roberto Ierusalimschy %!s(int64=11) %!d(string=hai) anos
pai
achega
77e7ebca0a
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      lobject.h

+ 4 - 4
lobject.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lobject.h,v 2.88 2014/04/30 16:48:44 roberto Exp roberto $
+** $Id: lobject.h,v 2.89 2014/05/01 18:18:06 roberto Exp roberto $
 ** Type definitions for Lua objects
 ** Type definitions for Lua objects
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -310,9 +310,9 @@ typedef union TString {
   struct {
   struct {
     CommonHeader;
     CommonHeader;
     lu_byte extra;  /* reserved words for short strings; "has hash" for longs */
     lu_byte extra;  /* reserved words for short strings; "has hash" for longs */
+    unsigned int hash;
     size_t len;  /* number of characters in string */
     size_t len;  /* number of characters in string */
     union TString *hnext;  /* linked list for hash table */
     union TString *hnext;  /* linked list for hash table */
-    unsigned int hash;
   } tsv;
   } tsv;
 } TString;
 } TString;
 
 
@@ -462,12 +462,12 @@ typedef struct Table {
   CommonHeader;
   CommonHeader;
   lu_byte flags;  /* 1<<p means tagmethod(p) is not present */
   lu_byte flags;  /* 1<<p means tagmethod(p) is not present */
   lu_byte lsizenode;  /* log2 of size of `node' array */
   lu_byte lsizenode;  /* log2 of size of `node' array */
-  struct Table *metatable;
+  int sizearray;  /* size of `array' array */
   TValue *array;  /* array part */
   TValue *array;  /* array part */
   Node *node;
   Node *node;
   Node *lastfree;  /* any free position is before this position */
   Node *lastfree;  /* any free position is before this position */
+  struct Table *metatable;
   GCObject *gclist;
   GCObject *gclist;
-  int sizearray;  /* size of `array' array */
 } Table;
 } Table;