aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/llimits.h b/llimits.h
index 0feba1d9..41f207e6 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llimits.h,v 1.114 2014/04/12 14:45:10 roberto Exp roberto $ 2** $Id: llimits.h,v 1.115 2014/04/15 14:28:20 roberto Exp roberto $
3** Limits, basic types, and some other `installation-dependent' definitions 3** Limits, basic types, and some other `installation-dependent' definitions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -107,15 +107,19 @@ typedef LUAI_UACINT l_uacInt;
107#define cast_uchar(i) cast(unsigned char, (i)) 107#define cast_uchar(i) cast(unsigned char, (i))
108 108
109 109
110/* cast a signed lua_Integer to lua_Unsigned */
111#if !defined(l_castS2U)
112#define l_castS2U(i) ((lua_Unsigned)(i))
113#endif
114
110/* 115/*
111** cast a lua_Unsigned to a signed lua_Integer; this cast is 116** cast a lua_Unsigned to a signed lua_Integer; this cast is
112** not strict ANSI C, but two-complement architectures should 117** not strict ANSI C, but two-complement architectures should
113** work fine. 118** work fine.
114*/ 119*/
115#define cast_u2s(i) ((lua_Integer)(i)) 120#if !defined(l_castU2S)
116 121#define l_castU2S(i) ((lua_Integer)(i))
117/* cast a signed lua_Integer to lua_Unsigned */ 122#endif
118#define cast_s2u(i) ((lua_Unsigned)(i))
119 123
120 124
121/* 125/*