mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
35 lines
585 B
C
35 lines
585 B
C
/*
|
|
Author: lyon
|
|
Tencent QQ: 645275593
|
|
*/
|
|
|
|
#include "PikaObj.h"
|
|
|
|
void _UpdateHandle(PikaObj* self) {
|
|
// override the handle function here
|
|
}
|
|
|
|
void _beforDinit(PikaObj* self) {
|
|
/* override in user code */
|
|
}
|
|
|
|
PikaObj* New_TinyObj(Args* args) {
|
|
PikaObj* self = pikaMalloc(sizeof(PikaObj));
|
|
|
|
/* List */
|
|
self->attributeList = New_args(NULL);
|
|
|
|
/* attribute */
|
|
obj_setPtr(self, "_ctx", self);
|
|
obj_setStr(self, "_n", "root");
|
|
|
|
/* load */
|
|
if (NULL != args) {
|
|
obj_load(self, args, "_n");
|
|
obj_load(self, args, "_ctx");
|
|
}
|
|
|
|
/* hard attribute */
|
|
return self;
|
|
}
|