0 (in MAX_SIZET) may be shorter than size_t

This commit is contained in:
Roberto Ierusalimschy 2000-06-06 13:27:11 -03:00
parent 292c953018
commit dbbf6c073b
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: llimits.h,v 1.7 2000/05/24 13:54:49 roberto Exp roberto $
** $Id: llimits.h,v 1.8 2000/05/26 14:04:04 roberto Exp roberto $
** Limits, basic types, and some other "instalation-dependent" definitions
** See Copyright Notice in lua.h
*/
@ -26,7 +26,7 @@ typedef LUA_NUM_TYPE Number;
typedef unsigned long lint32; /* unsigned int with at least 32 bits */
#define MAX_SIZET ((size_t)(~0)-2)
#define MAX_SIZET ((size_t)(~(size_t)0)-2)
#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */