lyon 994bb3bdc5 add weakref
add PikaUI test

test PikauI_core passed

save host_obj on methodArg

support save host_obj for method
2023-02-11 00:58:58 +08:00

12 lines
283 B
C

#include "weakref.h"
Arg* weakref_ref(PikaObj* self, Arg* obj) {
if (argType_isObject(arg_getType(obj))) {
Arg* ret = arg_copy(obj);
obj_refcntDec((PikaObj*)arg_getPtr(ret));
arg_setIsWeakRef(ret, PIKA_TRUE);
return ret;
}
return NULL;
}