From 8f961da3dbf8c45389d1431e6dff8e44e41f1a57 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 15 Apr 2014 11:29:30 -0300
Subject: macros cast_integer/cast_unsigned replaced by cast_u2s/cast_s2u, that
 should be used only between lua_Integer and lua_Unsigned

---
 lapi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'lapi.c')

diff --git a/lapi.c b/lapi.c
index c58ff807..dc620081 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lapi.c,v 2.202 2014/04/01 18:51:23 roberto Exp roberto $
+** $Id: lapi.c,v 2.203 2014/04/12 14:45:10 roberto Exp roberto $
 ** Lua API
 ** See Copyright Notice in lua.h
 */
@@ -376,7 +376,7 @@ LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *pisnum) {
   int isnum = 0;
   switch (ttype(o)) {
     case LUA_TNUMINT: {
-      res = cast_unsigned(ivalue(o));
+      res = cast_s2u(ivalue(o));
       isnum = 1;
       break;
     }
@@ -392,7 +392,7 @@ LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *pisnum) {
       n = l_mathop(fmod)(n, two2n);  /* n = n % 2^(numbits in an integer) */
       if (luai_numisnan(n))   /* not a number? */
         break;  /* not an integer, too */
-      res = cast_unsigned(n);  /* 'n' now must fit in an unsigned */
+      res = cast(lua_Unsigned, n);  /* 'n' now must fit in an unsigned */
       if (neg) res = 0u - res;  /* back to negative, if needed */
       isnum = 1;
       break;
@@ -514,7 +514,7 @@ LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) {
 
 LUA_API void lua_pushunsigned (lua_State *L, lua_Unsigned u) {
   lua_lock(L);
-  setivalue(L->top, cast_integer(u));
+  setivalue(L->top, cast_u2s(u));
   api_incr_top(L);
   lua_unlock(L);
 }
-- 
cgit v1.2.3-55-g6feb