mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
built-in dict is enabled by default
This commit is contained in:
parent
eae58359f1
commit
45a364aa3d
@ -51,6 +51,8 @@ class SysObj(BaseObj):
|
||||
def list(self) -> any:
|
||||
pass
|
||||
|
||||
def dict(self) -> any:
|
||||
pass
|
||||
|
||||
class RangeObj(TinyObj):
|
||||
def __next__(self) -> any:
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ class SysObj(BaseObj):
|
||||
def list(self) -> any:
|
||||
pass
|
||||
|
||||
def dict(self) -> any:
|
||||
pass
|
||||
|
||||
class RangeObj(TinyObj):
|
||||
def __next__(self) -> any:
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user