You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
497 B
18 lines
497 B
#include "lua_hdr.h"
|
|
|
|
extern int printf(const char *, ...);
|
|
extern void luaC_upvalbarrier_ (struct lua_State *L, struct UpVal *uv);
|
|
|
|
void luaV_op_call(struct lua_State *L, struct LClosure *cl, struct TValue *ra, int b, int c) {
|
|
struct UpVal *uv = cl->upvals[b];
|
|
|
|
uv->v->tt_ = ra->tt_;
|
|
uv->v->value_.n = ra->value_.n;
|
|
int b1 = iscollectable(uv->v);
|
|
uv->u.value.tt_ = 1;
|
|
struct TValue *value = &uv->u.value;
|
|
int b2 = uv->v != value;
|
|
if (b1 && !b2)
|
|
luaC_upvalbarrier_(L,uv);
|
|
}
|