Skip to content

Commit 29cce1c

Browse files
author
lyon
committed
use sysObj
1 parent 029cfda commit 29cce1c

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/boot/demo05-sysobject/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* this demo shows the usage of method */
22
#include "PikaStdLib_SysObj.h"
3-
#include "PikaMain.h"
43
#include <stdio.h>
54

65
void obj_runWithInfo(PikaObj *self, char *cmd)
@@ -12,7 +11,7 @@ void obj_runWithInfo(PikaObj *self, char *cmd)
1211
int main()
1312
{
1413
/* new root object */
15-
PikaObj *root = newRootObj("root", New_PikaMain);
14+
PikaObj *root = newRootObj("root", New_PikaStdLib_SysObj);
1615

1716
obj_runWithInfo(root, "set('a',1)");
1817
obj_runWithInfo(root, "print(a)");

src/package/pikascript/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from PikaObj import *
21
import PikaStdLib
32

43

5-
class PikaMain(PikaStdLib.SysObj):
6-
mem = PikaStdLib.MemChecker()
4+
print('hello world')
5+
mem = PikaStdLib.MemChecker()

0 commit comments

Comments
 (0)