From 83ebe9d3986e9e0d2dbc4879a16d6a82a0487ce7 Mon Sep 17 00:00:00 2001 From: lyon Date: Thu, 19 Jan 2023 17:47:34 +0800 Subject: [PATCH] update PikaStdLib --- package/PikaStdLib/PikaStdLib.pyi | 4 ++++ package/PikaStdLib/PikaStdLib_SysObj.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/package/PikaStdLib/PikaStdLib.pyi b/package/PikaStdLib/PikaStdLib.pyi index a84b5ad2d..47e34c514 100644 --- a/package/PikaStdLib/PikaStdLib.pyi +++ b/package/PikaStdLib/PikaStdLib.pyi @@ -119,6 +119,10 @@ class SysObj: @PIKA_C_MACRO_IF("!PIKA_NANO_ENABLE") def help(name: str): ... + @staticmethod + @PIKA_C_MACRO_IF("!PIKA_NANO_ENABLE") + def reboot(): ... + @PIKA_C_MACRO_IF("0") class RangeObj: diff --git a/package/PikaStdLib/PikaStdLib_SysObj.c b/package/PikaStdLib/PikaStdLib_SysObj.c index e1f7e0245..629c4ac80 100644 --- a/package/PikaStdLib/PikaStdLib_SysObj.c +++ b/package/PikaStdLib/PikaStdLib_SysObj.c @@ -682,3 +682,7 @@ void PikaStdLib_SysObj_help(PikaObj* self, char* name) { obj_printModules((PikaObj*)__pikaMain); } } + +void PikaStdLib_SysObj_reboot(PikaObj *self){ + pika_platform_reboot(); +}