more complete (and hopefuly more correct) handling of 'sizeof(char)'

This commit is contained in:
Roberto Ierusalimschy
2011-05-03 13:01:57 -03:00
parent bc1c718cc0
commit ad2531a0ee
6 changed files with 29 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lobject.h,v 2.48 2011/04/05 14:24:07 roberto Exp roberto $
** $Id: lobject.h,v 2.49 2011/04/07 16:11:57 roberto Exp roberto $
** Type definitions for Lua objects
** See Copyright Notice in lua.h
*/
@@ -249,7 +249,7 @@ typedef union TString {
CommonHeader;
lu_byte reserved;
unsigned int hash;
size_t len;
size_t len; /* number of characters in string */
} tsv;
} TString;
@@ -270,7 +270,7 @@ typedef union Udata {
CommonHeader;
struct Table *metatable;
struct Table *env;
size_t len;
size_t len; /* number of bytes */
} uv;
} Udata;