aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-05-07 08:12:51 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-05-07 08:12:51 -0300
commit77e7ebca0ab70a7ff00179099a0383314420b2af (patch)
tree2994f81a6262eb2b742b92afb8f000a49eea9906
parent6d5324f92f0a6e0bb19b2482c437652e3c2f82c0 (diff)
downloadlua-77e7ebca0ab70a7ff00179099a0383314420b2af.tar.gz
lua-77e7ebca0ab70a7ff00179099a0383314420b2af.tar.bz2
lua-77e7ebca0ab70a7ff00179099a0383314420b2af.zip
better alignments (for 64-bit arquitectures) for structures 'Table' and
'TString'
-rw-r--r--lobject.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lobject.h b/lobject.h
index e239f8c6..53febca7 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 2.88 2014/04/30 16:48:44 roberto Exp roberto $ 2** $Id: lobject.h,v 2.89 2014/05/01 18:18:06 roberto Exp roberto $
3** Type definitions for Lua objects 3** Type definitions for Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -310,9 +310,9 @@ typedef union TString {
310 struct { 310 struct {
311 CommonHeader; 311 CommonHeader;
312 lu_byte extra; /* reserved words for short strings; "has hash" for longs */ 312 lu_byte extra; /* reserved words for short strings; "has hash" for longs */
313 unsigned int hash;
313 size_t len; /* number of characters in string */ 314 size_t len; /* number of characters in string */
314 union TString *hnext; /* linked list for hash table */ 315 union TString *hnext; /* linked list for hash table */
315 unsigned int hash;
316 } tsv; 316 } tsv;
317} TString; 317} TString;
318 318
@@ -462,12 +462,12 @@ typedef struct Table {
462 CommonHeader; 462 CommonHeader;
463 lu_byte flags; /* 1<<p means tagmethod(p) is not present */ 463 lu_byte flags; /* 1<<p means tagmethod(p) is not present */
464 lu_byte lsizenode; /* log2 of size of `node' array */ 464 lu_byte lsizenode; /* log2 of size of `node' array */
465 struct Table *metatable; 465 int sizearray; /* size of `array' array */
466 TValue *array; /* array part */ 466 TValue *array; /* array part */
467 Node *node; 467 Node *node;
468 Node *lastfree; /* any free position is before this position */ 468 Node *lastfree; /* any free position is before this position */
469 struct Table *metatable;
469 GCObject *gclist; 470 GCObject *gclist;
470 int sizearray; /* size of `array' array */
471} Table; 471} Table;
472 472
473 473