Lines Matching refs:cast
215 #define cast(t,exp)((t)(exp)) macro
216 #define cast_byte(i)cast(lu_byte,(i))
217 #define cast_num(i)cast(lua_Number,(i))
218 #define cast_int(i)cast(int,(i))
261 #define setsvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=4;checklivene…
262 #define setuvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=7;checklivene…
263 #define setthvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=8;checkliven…
264 #define setclvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=6;checkliven…
265 #define sethvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=5;checklivene…
266 #define setptvalue(L,obj,x){TValue*i_o=(obj);i_o->value.gc=cast(GCObject*,(x));i_o->tt=(8+1);checkl…
280 #define getstr(ts)cast(const char*,(ts)+1)
367 #define lmod(s,size)(check_exp((size&(size-1))==0,(cast(int,(s)&((size)-1)))))
376 #define luaM_reallocv(L,b,on,n,e)((cast(size_t,(n)+1)<=((size_t)(~(size_t)0)-2)/(e))?luaM_realloc_(…
381 #define luaM_new(L,t)cast(t*,luaM_malloc(L,sizeof(t)))
382 #define luaM_newvector(L,n,t)cast(t*,luaM_reallocv(L,NULL,0,n,sizeof(t)))
383 #define luaM_growvector(L,v,nelems,size,t,limit,e)if((nelems)+1>(size))((v)=cast(t*,luaM_growaux_(L…
384 #define luaM_reallocvector(L,v,oldn,n,t)((v)=cast(t*,luaM_reallocv(L,v,oldn,n,sizeof(t))))
392 #define char2int(c)cast(int,cast(unsigned char,(c)))
510 #define obj2gco(v)(cast(GCObject*,(v)))
512 #define pcRel(pc,p)(cast(int,(pc)-(p)->code)-1)
560 #define resetbits(x,m)((x)&=cast(lu_byte,~(m)))
579 #define luaC_white(g)cast(lu_byte,(g)->currentwhite&bit2mask(0,1))
656 while(isspace(cast(unsigned char,*endptr)))endptr++; in luaO_str2d()
681 buff[0]=cast(char,va_arg(argp,int)); in luaO_pushvfstring()
813 #define sizeCclosure(n)(cast(int,sizeof(CClosure))+cast(int,sizeof(TValue)*((n)-1)))
814 #define sizeLclosure(n)(cast(int,sizeof(LClosure))+cast(int,sizeof(TValue*)*((n)-1)))
816 Closure*c=cast(Closure*,luaM_malloc(L,sizeCclosure(nelems)));
824 Closure*c=cast(Closure*,luaM_malloc(L,sizeLclosure(nelems)));
929 #define GET_OPCODE(i)(cast(OpCode,((i)>>0)&MASK1(6,0)))
930 #define SET_OPCODE(i,o)((i)=(((i)&MASK0(6,0))|((cast(Instruction,o)<<0)&MASK1(6,0))))
931 #define GETARG_A(i)(cast(int,((i)>>(0+6))&MASK1(8,0)))
932 #define SETARG_A(i,u)((i)=(((i)&MASK0(8,(0+6)))|((cast(Instruction,u)<<(0+6))&MASK1(8,(0+6)))))
933 #define GETARG_B(i)(cast(int,((i)>>(((0+6)+8)+9))&MASK1(9,0)))
934 #define SETARG_B(i,b)((i)=(((i)&MASK0(9,(((0+6)+8)+9)))|((cast(Instruction,b)<<(((0+6)+8)+9))&MASK1…
935 #define GETARG_C(i)(cast(int,((i)>>((0+6)+8))&MASK1(9,0)))
936 #define SETARG_C(i,b)((i)=(((i)&MASK0(9,((0+6)+8)))|((cast(Instruction,b)<<((0+6)+8))&MASK1(9,((0+6…
937 #define GETARG_Bx(i)(cast(int,((i)>>((0+6)+8))&MASK1((9+9),0)))
938 #define SETARG_Bx(i,b)((i)=(((i)&MASK0((9+9),((0+6)+8)))|((cast(Instruction,b)<<((0+6)+8))&MASK1((9…
940 #define SETARG_sBx(i,b)SETARG_Bx((i),cast(unsigned int,(b)+(((1<<(9+9))-1)>>1)))
941 #define CREATE_ABC(o,a,b,c)((cast(Instruction,o)<<0)|(cast(Instruction,a)<<(0+6))|(cast(Instruction…
942 #define CREATE_ABx(o,a,bc)((cast(Instruction,o)<<0)|(cast(Instruction,a)<<(0+6))|(cast(Instruction,…
946 static const lu_byte luaP_opmodes[(cast(int,OP_VARARG)+1)];
947 #define getBMode(m)(cast(enum OpArgMask,(luaP_opmodes[m]>>4)&3))
948 #define getCMode(m)(cast(enum OpArgMask,(luaP_opmodes[m]>>2)&3))
1239 struct SParser*p=cast(struct SParser*,ud);
1289 ts=cast(TString*,luaM_malloc(L,(l+1)*sizeof(char)+sizeof(TString)));
1302 if(tb->nuse>cast(lu_int32,tb->size)&&tb->size<=(INT_MAX-2)/2)
1308 unsigned int h=cast(unsigned int,l);
1312 h=h^((h<<5)+(h>>2)+cast(unsigned char,str[l1-1]));
1328 u=cast(Udata*,luaM_malloc(L,s+sizeof(Udata)));
1493 t->node=cast(Node*,(&dummynode_));
1563 t->node=cast(Node*,(&dummynode_));
1609 if(cast(unsigned int,key)-1<cast(unsigned int,t->sizearray))
1657 return cast(TValue*,p);
1668 return cast(TValue*,p);
1678 return cast(TValue*,p);
1691 if(j>cast(unsigned int,(INT_MAX-2))){
2033 if(g->strt.nuse<cast(lu_int32,g->strt.size/4)&&
2257 #define fromstate(l)(cast(lu_byte*,(l))-0)
2258 #define tostate(l)(cast(lua_State*,cast(lu_byte*,l)+0))
2620 static const lu_byte luaP_opmodes[(cast(int,OP_VARARG)+1)]={
2681 b->buffer[b->n++]=cast(char,c);
2685 for(i=0;i<(cast(int,TK_WHILE-257+1));i++){
3651 luaK_code(fs,cast(Instruction,c),fs->ls->lastline);
3744 fs->actvar[fs->nactvar+n]=cast(unsigned short,registerlocalvar(ls,name));
5317 if(o>=L->top)return cast(TValue*,(&luaO_nilobject_));
5337 :cast(TValue*,(&luaO_nilobject_));
5766 struct CallS*c=cast(struct CallS*,ud);