mirror of
https://github.com/pocketpy/pocketpy
synced 2026-02-04 06:30:17 +00:00
update init example
This commit is contained in:
parent
3fe55bbe76
commit
98fabb45bf
@ -112,7 +112,7 @@ int main() {
|
||||
if(!ok) goto __ERROR;
|
||||
|
||||
// Create a list: [1, 2, 3]
|
||||
py_Ref r0 = py_getreg(0);
|
||||
py_Ref r0 = py_tmpr0();
|
||||
py_newlistn(r0, 3);
|
||||
py_newint(py_list_getitem(r0, 0), 1);
|
||||
py_newint(py_list_getitem(r0, 1), 2);
|
||||
|
||||
@ -85,7 +85,7 @@ int main() {
|
||||
if(!ok) goto __ERROR;
|
||||
|
||||
// Create a list: [1, 2, 3]
|
||||
py_Ref r0 = py_getreg(0);
|
||||
py_Ref r0 = py_tmpr0();
|
||||
py_newlistn(r0, 3);
|
||||
py_newint(py_list_getitem(r0, 0), 1);
|
||||
py_newint(py_list_getitem(r0, 1), 2);
|
||||
|
||||
@ -20,7 +20,7 @@ int main() {
|
||||
if(!ok) goto __ERROR;
|
||||
|
||||
// Create a list: [1, 2, 3]
|
||||
py_Ref r0 = py_getreg(0);
|
||||
py_Ref r0 = py_tmpr0();
|
||||
py_newlistn(r0, 3);
|
||||
py_newint(py_list_getitem(r0, 0), 1);
|
||||
py_newint(py_list_getitem(r0, 1), 2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user