mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
28 lines
751 B
C
28 lines
751 B
C
|
#include "BaseObj.h"
|
||
|
#include "dataStrs.h"
|
||
|
|
||
|
void PikaStdLib_SysObj_remove(PikaObj* self, char* argPath) {
|
||
|
obj_setErrorCode(self, 0);
|
||
|
int32_t res = obj_removeArg(self, argPath);
|
||
|
if (1 == res) {
|
||
|
obj_setSysOut(self, "[error] del: object no found.");
|
||
|
obj_setErrorCode(self, 1);
|
||
|
return;
|
||
|
}
|
||
|
if (2 == res) {
|
||
|
obj_setSysOut(self, "[error] del: arg not match.");
|
||
|
obj_setErrorCode(self, 2);
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void PikaStdLib_SysObj_type(PikaObj* self, char* argPath) {
|
||
|
Arg* arg = obj_getArg(self, argPath);
|
||
|
if (NULL == arg) {
|
||
|
obj_setSysOut(self, "[error] type: arg no found.");
|
||
|
obj_setErrorCode(self, 1);
|
||
|
return;
|
||
|
}
|
||
|
obj_setSysOut(self, arg_getType(arg));
|
||
|
}
|