This commit is contained in:
pikastech 2022-09-30 10:16:08 +08:00
parent b21fd029ed
commit 57e72880a5
3 changed files with 3 additions and 4 deletions

View File

@ -621,7 +621,6 @@ void _update_proxy(PikaObj* self, char* name) {
}
static void obj_saveMethodInfo(PikaObj* self, MethodInfo* method_info) {
Args buffs = {0};
method_info->pars = method_info->dec;
Arg* arg = New_arg(NULL);
uint32_t size_pars = strGetSize(method_info->pars);
@ -640,7 +639,6 @@ static void obj_saveMethodInfo(PikaObj* self, MethodInfo* method_info) {
_update_proxy(self, method_info->name);
args_setArg(self->list, arg);
strsDeinit(&buffs);
}
static int32_t __class_defineMethodWithType(PikaObj* self,

View File

@ -1459,7 +1459,7 @@ static Arg* VM_instruction_handler_OUT(PikaObj* self,
Arg* global_list_arg = arg_newStr(global_list);
char* global_list_buff = arg_getStr(global_list_arg);
/* for each arg arg in global_list */
char token_buff[32] = {0};
char token_buff[PIKA_NAME_BUFF_SIZE] = {0};
for (int i = 0; i < strCountSign(global_list, ',') + 1; i++) {
char* global_arg = strPopToken(token_buff, global_list_buff, ',');
/* matched global arg, context set to global */

View File

@ -65,7 +65,8 @@ char* strCut(char* strOut, char* strIn, char startSign, char endSign) {
char* strDeleteChar(char* strOut, char* strIn, char ch) {
int32_t iOut = 0;
for (uint32_t i = 0; i < strGetSize(strIn); i++) {
uint32_t size = strGetSize(strIn);
for (uint32_t i = 0; i < size; i++) {
if (ch == strIn[i]) {
continue;
}