summaryrefslogtreecommitdiff
path: root/src/types.h
diff options
context:
space:
mode:
authorLua Team <team@lua.org>1995-02-07 12:00:00 +0000
committerrepogen <>1995-02-07 12:00:00 +0000
commita8b6ba0954edb9e0e669e1f451b9a8f145ce5166 (patch)
tree35e9e9999968c4f13a25a5f647203456f044274a /src/types.h
parent944fc7d7d95575f2b8023c1f3d4ac19e1369fc76 (diff)
downloadlua-github-2.1.tar.gz
Lua 2.12.1
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h
new file mode 100644
index 00000000..43684228
--- /dev/null
+++ b/src/types.h
@@ -0,0 +1,31 @@
+/*
+** TeCGraf - PUC-Rio
+** $Id: types.h,v 1.3 1995/02/06 19:32:43 roberto Exp $
+*/
+
+#ifndef types_h
+#define types_h
+
+#include <limits.h>
+
+#ifndef real
+#define real float
+#endif
+
+typedef int Bool; /* boolean values */
+
+#define Byte lua_Byte /* some systems have Byte as a predefined type */
+typedef unsigned char Byte; /* unsigned 8 bits */
+
+#define Word lua_Word /* some systems have Word as a predefined type */
+typedef unsigned short Word; /* unsigned 16 bits */
+
+#define MAX_WORD (USHRT_MAX-2) /* maximum value of a word (-2 for safety) */
+#define MAX_INT (INT_MAX-2) /* maximum value of a int (-2 for safety) */
+
+#define Long lua_Long /* some systems have Long as a predefined type */
+typedef signed long Long; /* 32 bits */
+
+typedef unsigned int IntPoint; /* unsigned with same size as a pointer (for hashing) */
+
+#endif