summaryrefslogtreecommitdiff
path: root/src/llimits.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/llimits.h')
-rw-r--r--src/llimits.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/llimits.h b/src/llimits.h
index 95a51a0b..6be658f0 100644
--- a/src/llimits.h
+++ b/src/llimits.h
@@ -1,5 +1,5 @@
/*
-** $Id: llimits.h,v 1.60 2004/09/10 17:30:46 roberto Exp $
+** $Id: llimits.h,v 1.61 2004/11/24 18:55:56 roberto Exp $
** Limits, basic types, and some other `installation-dependent' definitions
** See Copyright Notice in lua.h
*/
@@ -18,22 +18,9 @@
typedef LUA_UINT32 lu_int32;
-typedef LUA_INT32 l_int32;
+typedef LU_MEM lu_mem;
-
-/*
-** an unsigned integer big enough to count the total memory used by Lua;
-** it should be at least as large as `size_t'
-*/
-typedef lu_int32 lu_mem;
-
-
-/*
-** a signed integer big enough to count the total memory used by Lua;
-** it should be at least as large as `size_t'
-*/
-typedef l_int32 l_mem;
-#define MAXLMEM LUA_MAXINT32
+typedef L_MEM l_mem;
@@ -43,6 +30,8 @@ typedef unsigned char lu_byte;
#define MAX_SIZET ((size_t)(~(size_t)0)-2)
+#define MAX_LUMEM ((lu_mem)(~(lu_mem)0)-2)
+
#define MAX_INT (INT_MAX-2) /* maximum value of an int (-2 for safety) */
@@ -51,7 +40,7 @@ typedef unsigned char lu_byte;
** this is for hashing only; there is no problem if the integer
** cannot hold the whole pointer value
*/
-#define IntPoint(p) ((unsigned int)(p))
+#define IntPoint(p) ((unsigned int)(lu_mem)(p))