mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
fix mem error in for in range()
This commit is contained in:
parent
dbc9b8e01c
commit
a3465dbbeb
@ -4,10 +4,8 @@ import PikaStdData
|
||||
import PikaMath
|
||||
from PikaObj import *
|
||||
|
||||
list = PikaStdData.List()
|
||||
i = 0
|
||||
while i < 10:
|
||||
list.append(i)
|
||||
i = i + 1
|
||||
for item in list:
|
||||
print(item)
|
||||
for i in range(0, 100):
|
||||
print(i)
|
||||
|
||||
for i in range(0, 100):
|
||||
print(i)
|
||||
|
@ -495,12 +495,12 @@ exit:
|
||||
|
||||
int32_t obj_removeArg(PikaObj* self, char* argPath) {
|
||||
PikaObj* objHost = obj_getObj(self, argPath, 1);
|
||||
PikaObj* obj = obj_getObj(self, argPath, 0);
|
||||
Arg* obj_arg = obj_getArg(self, argPath);
|
||||
Args* buffs = New_strBuff();
|
||||
char* argName;
|
||||
int32_t res;
|
||||
if (NULL != obj) {
|
||||
obj_deinit(obj);
|
||||
if (TYPE_OBJECT == arg_getType(obj_arg)) {
|
||||
obj_deinit(arg_getPtr(obj_arg));
|
||||
}
|
||||
int32_t err = 0;
|
||||
if (NULL == objHost) {
|
||||
|
@ -116,7 +116,7 @@ static enum Instruct getInstruct(char* line) {
|
||||
}
|
||||
if (0 == strncmp(line + 2, "DEL", 3)) {
|
||||
/* delete */
|
||||
return EST;
|
||||
return DEL;
|
||||
}
|
||||
if (0 == strncmp(line + 2, "EST", 3)) {
|
||||
/* is exist */
|
||||
|
Loading…
x
Reference in New Issue
Block a user