mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
use more PIKA_PYTHON macro
This commit is contained in:
parent
d384352c2c
commit
156c842381
@ -208,9 +208,10 @@ void PikaStdTask_Task_run_once(PikaObj* self) {
|
||||
|
||||
void __Task_update_tick(PikaObj* self) {
|
||||
if (obj_getInt(self, "is_perod")) {
|
||||
/*
|
||||
pikaVM_run(self, "platformGetTick()");
|
||||
*/
|
||||
PIKA_PYTHON(
|
||||
platformGetTick()
|
||||
)
|
||||
PIKA_BYTECODE_BEGIN
|
||||
const uint8_t bytes[] = {
|
||||
0x04, 0x00, /* instruct array size */
|
||||
0x00, 0x82, 0x01, 0x00, /* instruct array */
|
||||
@ -218,6 +219,7 @@ void __Task_update_tick(PikaObj* self) {
|
||||
0x00, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x00, /* const pool */
|
||||
};
|
||||
PIKA_BYTECODE_END
|
||||
pikaVM_runByteCode(self, (uint8_t*)bytes);
|
||||
}
|
||||
}
|
||||
|
@ -208,9 +208,10 @@ void PikaStdTask_Task_run_once(PikaObj* self) {
|
||||
|
||||
void __Task_update_tick(PikaObj* self) {
|
||||
if (obj_getInt(self, "is_perod")) {
|
||||
/*
|
||||
pikaVM_run(self, "platformGetTick()");
|
||||
*/
|
||||
PIKA_PYTHON(
|
||||
platformGetTick()
|
||||
)
|
||||
PIKA_BYTECODE_BEGIN
|
||||
const uint8_t bytes[] = {
|
||||
0x04, 0x00, /* instruct array size */
|
||||
0x00, 0x82, 0x01, 0x00, /* instruct array */
|
||||
@ -218,6 +219,7 @@ void __Task_update_tick(PikaObj* self) {
|
||||
0x00, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d,
|
||||
0x47, 0x65, 0x74, 0x54, 0x69, 0x63, 0x6b, 0x00, /* const pool */
|
||||
};
|
||||
PIKA_BYTECODE_END
|
||||
pikaVM_runByteCode(self, (uint8_t*)bytes);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user