aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-22 14:19:56 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-12-22 14:19:56 -0200
commitc505f341d638f8f0adcef4df85bcc8def6c930a3 (patch)
treebfa689a7545e47cfd154066cd8d962daa6bc611e /lapi.c
parent428325baecb2f514ea3eb6c87405f93872fb8430 (diff)
downloadlua-c505f341d638f8f0adcef4df85bcc8def6c930a3.tar.gz
lua-c505f341d638f8f0adcef4df85bcc8def6c930a3.tar.bz2
lua-c505f341d638f8f0adcef4df85bcc8def6c930a3.zip
small changes in casts
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lapi.c b/lapi.c
index 3c05942e..27148928 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.50 2005/09/20 17:55:10 roberto Exp roberto $ 2** $Id: lapi.c,v 2.51 2005/10/20 11:35:50 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -153,7 +153,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) {
153 153
154 154
155LUA_API int lua_gettop (lua_State *L) { 155LUA_API int lua_gettop (lua_State *L) {
156 return cast(int, L->top - L->base); 156 return cast_int(L->top - L->base);
157} 157}
158 158
159 159
@@ -430,7 +430,7 @@ LUA_API void lua_pushnumber (lua_State *L, lua_Number n) {
430 430
431LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) { 431LUA_API void lua_pushinteger (lua_State *L, lua_Integer n) {
432 lua_lock(L); 432 lua_lock(L);
433 setnvalue(L->top, cast(lua_Number, n)); 433 setnvalue(L->top, cast_num(n));
434 api_incr_top(L); 434 api_incr_top(L);
435 lua_unlock(L); 435 lua_unlock(L);
436} 436}
@@ -910,11 +910,11 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
910 } 910 }
911 case LUA_GCCOUNT: { 911 case LUA_GCCOUNT: {
912 /* GC values are expressed in Kbytes: #bytes/2^10 */ 912 /* GC values are expressed in Kbytes: #bytes/2^10 */
913 res = cast(int, g->totalbytes >> 10); 913 res = cast_int(g->totalbytes >> 10);
914 break; 914 break;
915 } 915 }
916 case LUA_GCCOUNTB: { 916 case LUA_GCCOUNTB: {
917 res = cast(int, g->totalbytes & 0x3ff); 917 res = cast_int(g->totalbytes & 0x3ff);
918 break; 918 break;
919 } 919 }
920 case LUA_GCSTEP: { 920 case LUA_GCSTEP: {
@@ -983,7 +983,7 @@ LUA_API void lua_concat (lua_State *L, int n) {
983 api_checknelems(L, n); 983 api_checknelems(L, n);
984 if (n >= 2) { 984 if (n >= 2) {
985 luaC_checkGC(L); 985 luaC_checkGC(L);
986 luaV_concat(L, n, cast(int, L->top - L->base) - 1); 986 luaV_concat(L, n, cast_int(L->top - L->base) - 1);
987 L->top -= (n-1); 987 L->top -= (n-1);
988 } 988 }
989 else if (n == 0) { /* push empty string */ 989 else if (n == 0) { /* push empty string */