built-in dict is enabled by default

This commit is contained in:
lyon1998 2022-04-14 16:12:18 +08:00
parent eae58359f1
commit 45a364aa3d
5 changed files with 27 additions and 2 deletions

View File

@ -51,6 +51,8 @@ class SysObj(BaseObj):
def list(self) -> any:
pass
def dict(self) -> any:
pass
class RangeObj(TinyObj):
def __next__(self) -> any:

View File

@ -223,6 +223,16 @@ Arg* PikaStdLib_SysObj_list(PikaObj *self){
return obj_newObjInPackage(New_PikaStdData_List);
#endif
obj_setErrorCode(self, 1);
__platform_printf("[Error] list: built-in list is not enabled.\r\n");
__platform_printf("[Error] built-in list is not enabled.\r\n");
return arg_setNull(NULL);
}
Arg* PikaStdLib_SysObj_dict(PikaObj *self){
#if PIKA_BUILTIN_DICT_ENBALE
PikaObj *New_PikaStdData_Dict(Args *args);
return obj_newObjInPackage(New_PikaStdData_Dict);
#endif
obj_setErrorCode(self, 1);
__platform_printf("[Error] built-in dist is not enabled.\r\n");
return arg_setNull(NULL);
}

View File

@ -51,6 +51,8 @@ class SysObj(BaseObj):
def list(self) -> any:
pass
def dict(self) -> any:
pass
class RangeObj(TinyObj):
def __next__(self) -> any:

View File

@ -223,6 +223,16 @@ Arg* PikaStdLib_SysObj_list(PikaObj *self){
return obj_newObjInPackage(New_PikaStdData_List);
#endif
obj_setErrorCode(self, 1);
__platform_printf("[Error] list: built-in list is not enabled.\r\n");
__platform_printf("[Error] built-in list is not enabled.\r\n");
return arg_setNull(NULL);
}
Arg* PikaStdLib_SysObj_dict(PikaObj *self){
#if PIKA_BUILTIN_DICT_ENBALE
PikaObj *New_PikaStdData_Dict(Args *args);
return obj_newObjInPackage(New_PikaStdData_Dict);
#endif
obj_setErrorCode(self, 1);
__platform_printf("[Error] built-in dist is not enabled.\r\n");
return arg_setNull(NULL);
}

View File

@ -36,6 +36,7 @@
#define PIKA_ARG_ALIGN_ENABLE 1
#define PIKA_METHOD_CACHE_ENABLE 0
#define PIKA_BUILTIN_LIST_ENBALE 1
#define PIKA_BUILTIN_DICT_ENBALE 1
/* optimize options */
#define PIKA_OPTIMIZE_SIZE 0