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
|
import PikaMath
|
||||||
from PikaObj import *
|
from PikaObj import *
|
||||||
|
|
||||||
list = PikaStdData.List()
|
for i in range(0, 100):
|
||||||
i = 0
|
print(i)
|
||||||
while i < 10:
|
|
||||||
list.append(i)
|
for i in range(0, 100):
|
||||||
i = i + 1
|
print(i)
|
||||||
for item in list:
|
|
||||||
print(item)
|
|
||||||
|
@ -495,12 +495,12 @@ exit:
|
|||||||
|
|
||||||
int32_t obj_removeArg(PikaObj* self, char* argPath) {
|
int32_t obj_removeArg(PikaObj* self, char* argPath) {
|
||||||
PikaObj* objHost = obj_getObj(self, argPath, 1);
|
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();
|
Args* buffs = New_strBuff();
|
||||||
char* argName;
|
char* argName;
|
||||||
int32_t res;
|
int32_t res;
|
||||||
if (NULL != obj) {
|
if (TYPE_OBJECT == arg_getType(obj_arg)) {
|
||||||
obj_deinit(obj);
|
obj_deinit(arg_getPtr(obj_arg));
|
||||||
}
|
}
|
||||||
int32_t err = 0;
|
int32_t err = 0;
|
||||||
if (NULL == objHost) {
|
if (NULL == objHost) {
|
||||||
|
@ -116,7 +116,7 @@ static enum Instruct getInstruct(char* line) {
|
|||||||
}
|
}
|
||||||
if (0 == strncmp(line + 2, "DEL", 3)) {
|
if (0 == strncmp(line + 2, "DEL", 3)) {
|
||||||
/* delete */
|
/* delete */
|
||||||
return EST;
|
return DEL;
|
||||||
}
|
}
|
||||||
if (0 == strncmp(line + 2, "EST", 3)) {
|
if (0 == strncmp(line + 2, "EST", 3)) {
|
||||||
/* is exist */
|
/* is exist */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user