瀏覽代碼

style: 设置了ofunc的函数为static

SongZihuan 4 年之前
父節點
當前提交
490c189ef7

+ 2 - 2
vmcore/ofunc/src/bool.c

@@ -8,7 +8,7 @@ LinkValue *boolCore(LinkValue *belong, LinkValue *class, Inter *inter) {
     return value;
 }
 
-ResultType bool_new(O_FUNC){
+static ResultType bool_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -27,7 +27,7 @@ ResultType bool_new(O_FUNC){
     return result->type;
 }
 
-ResultType bool_init(O_FUNC){
+static ResultType bool_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
                            {.must=-1}};

+ 9 - 9
vmcore/ofunc/src/dict.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType dict_new(O_FUNC){
+static ResultType dict_new(O_FUNC){
     LinkValue *value = NULL;
     VarList *hash = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
@@ -33,7 +33,7 @@ ResultType dict_new(O_FUNC){
     return result->type;
 }
 
-ResultType dict_down(O_FUNC){
+static ResultType dict_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -63,7 +63,7 @@ ResultType dict_down(O_FUNC){
     return result->type;
 }
 
-ResultType dict_down_del(O_FUNC){
+static ResultType dict_down_del(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -93,7 +93,7 @@ ResultType dict_down_del(O_FUNC){
     return result->type;
 }
 
-ResultType dict_down_assignment(O_FUNC){
+static ResultType dict_down_assignment(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
@@ -116,7 +116,7 @@ ResultType dict_down_assignment(O_FUNC){
     return result->type;
 }
 
-ResultType dict_keys(O_FUNC){
+static ResultType dict_keys(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     Argument *list = NULL;
@@ -139,7 +139,7 @@ ResultType dict_keys(O_FUNC){
     return result->type;
 }
 
-ResultType dict_iter(O_FUNC){
+static ResultType dict_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
@@ -161,7 +161,7 @@ ResultType dict_iter(O_FUNC){
     return result->type;
 }
 
-ResultType dictRepoStrCore(O_FUNC, bool is_repo){
+static ResultType dictRepoStrCore(O_FUNC, bool is_repo){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo = NULL;
@@ -236,11 +236,11 @@ ResultType dictRepoStrCore(O_FUNC, bool is_repo){
     return result->type;
 }
 
-ResultType dict_repo(O_FUNC){
+static ResultType dict_repo(O_FUNC){
     return dictRepoStrCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType dict_str(O_FUNC){
+static ResultType dict_str(O_FUNC){
     return dictRepoStrCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 

+ 3 - 3
vmcore/ofunc/src/dictiter.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType dictiter_init(O_FUNC){
+static ResultType dictiter_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"dict_", .must=1, .long_arg=false},
                            {.must=-1}};
@@ -65,7 +65,7 @@ ResultType dictiter_init(O_FUNC){
     return result->type;
 }
 
-ResultType dictiter_next(O_FUNC){
+static ResultType dictiter_next(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *list_ = NULL;
@@ -98,7 +98,7 @@ ResultType dictiter_next(O_FUNC){
     return result->type;
 }
 
-ResultType dictiter_down(O_FUNC){
+static ResultType dictiter_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};

+ 2 - 2
vmcore/ofunc/src/dou.c

@@ -8,7 +8,7 @@ LinkValue *douCore(LinkValue *belong, LinkValue *class, Inter *inter) {
     return value;
 }
 
-ResultType dou_new(O_FUNC){
+static ResultType dou_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -27,7 +27,7 @@ ResultType dou_new(O_FUNC){
     return result->type;
 }
 
-ResultType dou_init(O_FUNC){
+static ResultType dou_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"num", .must=0, .long_arg=false},
                            {.must=-1}};

+ 1 - 1
vmcore/ofunc/src/error_.c

@@ -6,7 +6,7 @@ static LinkValue *makeException(LinkValue *father, Inter *inter){
     return exc;
 }
 
-ResultType base_exception_init(O_FUNC){
+static ResultType base_exception_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"message", .must=0, .long_arg=false},
                            {.must=-1}};

+ 15 - 15
vmcore/ofunc/src/file_.c

@@ -6,7 +6,7 @@ static void setFunctionData(Value *value, LinkValue *cls, Inter *inter) {
     value->data.function.function_data.run = false;
 }
 
-ResultType file_new(O_FUNC){
+static ResultType file_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -29,7 +29,7 @@ ResultType file_new(O_FUNC){
     return result->type;
 }
 
-ResultType file_init(O_FUNC){
+static ResultType file_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .must=0, .name=L"file", .long_arg=false},
                            {.type=name_value, .must=0, .name=L"mode", .long_arg=false},
@@ -77,7 +77,7 @@ ResultType file_init(O_FUNC){
     return result->type;
 }
 
-ResultType file_read(O_FUNC){
+static ResultType file_read(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .must=0, .name=L"n", .long_arg=false},
                            {.must=-1}};
@@ -126,7 +126,7 @@ ResultType file_read(O_FUNC){
     return result->type;
 }
 
-ResultType file_readline(O_FUNC){
+static ResultType file_readline(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *file;
@@ -161,7 +161,7 @@ ResultType file_readline(O_FUNC){
     return result->type;
 }
 
-ResultType file_write(O_FUNC){
+static ResultType file_write(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .must=1, .name=L"str", .long_arg=false},
                            {.must=-1}};
@@ -188,7 +188,7 @@ ResultType file_write(O_FUNC){
     return result->type;
 }
 
-ResultType file_get_seek(O_FUNC){
+static ResultType file_get_seek(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *file;
@@ -209,7 +209,7 @@ ResultType file_get_seek(O_FUNC){
     return result->type;
 }
 
-ResultType file_flush(O_FUNC){
+static ResultType file_flush(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *file;
@@ -231,7 +231,7 @@ ResultType file_flush(O_FUNC){
     return result->type;
 }
 
-ResultType file_getc(O_FUNC){
+static ResultType file_getc(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *file;
@@ -257,7 +257,7 @@ ResultType file_getc(O_FUNC){
     return result->type;
 }
 
-ResultType file_err_core(O_FUNC, int type){
+static ResultType file_err_core(O_FUNC, int type){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *file;
@@ -288,19 +288,19 @@ ResultType file_err_core(O_FUNC, int type){
     return result->type;
 }
 
-ResultType file_isend(O_FUNC){
+static ResultType file_isend(O_FUNC){
     return file_err_core(CO_FUNC(arg, var_list, result, belong), 1);
 }
 
-ResultType file_iserr(O_FUNC){
+static ResultType file_iserr(O_FUNC){
     return file_err_core(CO_FUNC(arg, var_list, result, belong), 2);
 }
 
-ResultType file_clean_err(O_FUNC){
+static ResultType file_clean_err(O_FUNC){
     return file_err_core(CO_FUNC(arg, var_list, result, belong), 3);
 }
 
-ResultType file_seek(O_FUNC){
+static ResultType file_seek(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .must=1, .name=L"seek", .long_arg=false},
                            {.type=name_value, .must=0, .name=L"where", .long_arg=false},
@@ -351,7 +351,7 @@ ResultType file_seek(O_FUNC){
     return result->type;
 }
 
-ResultType file_close(O_FUNC){
+static ResultType file_close(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *file;
@@ -380,7 +380,7 @@ ResultType file_close(O_FUNC){
     return result->type;
 }
 
-ResultType file_enter(O_FUNC){
+static ResultType file_enter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);

+ 3 - 3
vmcore/ofunc/src/function.c

@@ -7,7 +7,7 @@ static void setFunctionData(Value *value, LinkValue *cls, Inter *inter) {
     value->data.function.function_data.push = true;
 }
 
-ResultType function_new(O_FUNC){
+static ResultType function_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -37,7 +37,7 @@ ResultType function_new(O_FUNC){
     return result->type;
 }
 
-ResultType function_init(O_FUNC){
+static ResultType function_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
                            {.must=-1}};
@@ -63,7 +63,7 @@ ResultType function_init(O_FUNC){
     return result->type;
 }
 
-ResultType function_set(O_FUNC){  // 针对FFI设置vaargs
+static ResultType function_set(O_FUNC){  // 针对FFI设置vaargs
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=true},
                            {.must=-1}};

+ 2 - 2
vmcore/ofunc/src/int.c

@@ -8,7 +8,7 @@ LinkValue *intCore(LinkValue *belong, LinkValue *class, Inter *inter) {
     return value;
 }
 
-ResultType int_new(O_FUNC){
+static ResultType int_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -27,7 +27,7 @@ ResultType int_new(O_FUNC){
     return result->type;
 }
 
-ResultType int_init(O_FUNC){
+static ResultType int_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"num", .must=0, .long_arg=false},
                            {.must=-1}};

+ 2 - 2
vmcore/ofunc/src/io.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType vm_print(O_FUNC){
+static ResultType vm_print(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=true},
                            {.type=name_value, .name=L"end", .must=0, .value=NULL},
                            {.must=-1}};
@@ -30,7 +30,7 @@ ResultType vm_print(O_FUNC){
     return result->type;
 }
 
-ResultType vm_input(O_FUNC){
+static ResultType vm_input(O_FUNC){
     setResultCore(result);
     ArgumentParser ap[] = {{.type=name_value, .name=L"message", .must=0, .value=NULL},
                            {.must=-1}};

+ 5 - 5
vmcore/ofunc/src/lib_.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType lib_new(O_FUNC){
+static ResultType lib_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -19,7 +19,7 @@ ResultType lib_new(O_FUNC){
     return result->type;
 }
 
-ResultType lib_init(O_FUNC){
+static ResultType lib_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"path", .must=1, .long_arg=false},
                            {.must=-1}};
@@ -63,7 +63,7 @@ ResultType lib_init(O_FUNC){
     return result->type;
 }
 
-ResultType lib_close(O_FUNC){
+static ResultType lib_close(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *clib;
@@ -109,7 +109,7 @@ ResultType lib_addCore(wchar_t *name_, LinkValue *clib, FUNC_NT) {
     return result->type;
 }
 
-ResultType lib_add(O_FUNC){
+static ResultType lib_add(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"func", .must=1, .long_arg=false},
                            {.must=-1}};
@@ -134,7 +134,7 @@ ResultType lib_add(O_FUNC){
     return result->type;
 }
 
-ResultType lib_attr(O_FUNC){
+static ResultType lib_attr(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"error", .must=1, .long_arg=false},
                            {.must=-1}};

+ 13 - 13
vmcore/ofunc/src/list.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType tuple_list_newCore(O_FUNC, enum ListType type){
+static ResultType tuple_list_newCore(O_FUNC, enum ListType type){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=true},
@@ -27,15 +27,15 @@ ResultType tuple_list_newCore(O_FUNC, enum ListType type){
     return result->type;
 }
 
-ResultType tuple_new(O_FUNC) {
+static ResultType tuple_new(O_FUNC) {
     return tuple_list_newCore(CO_FUNC(arg, var_list, result, belong), L_tuple);
 }
 
-ResultType list_new(O_FUNC) {
+static ResultType list_new(O_FUNC) {
     return tuple_list_newCore(CO_FUNC(arg, var_list, result, belong), L_list);
 }
 
-ResultType list_slice(O_FUNC){
+static ResultType list_slice(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
@@ -84,7 +84,7 @@ ResultType list_slice(O_FUNC){
     return result->type;
 }
 
-ResultType list_slice_assignment(O_FUNC){
+static ResultType list_slice_assignment(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
@@ -153,7 +153,7 @@ ResultType list_slice_assignment(O_FUNC){
     return result->type;
 }
 
-ResultType list_slice_del(O_FUNC){
+static ResultType list_slice_del(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
@@ -211,7 +211,7 @@ ResultType list_slice_del(O_FUNC){
     return result->type;
 }
 
-ResultType list_down_assignment(O_FUNC){
+static ResultType list_down_assignment(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
@@ -249,7 +249,7 @@ ResultType list_down_assignment(O_FUNC){
     return result->type;
 }
 
-ResultType list_down_del(O_FUNC){
+static ResultType list_down_del(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -287,7 +287,7 @@ ResultType list_down_del(O_FUNC){
     return result->type;
 }
 
-ResultType list_down(O_FUNC){
+static ResultType list_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -318,7 +318,7 @@ ResultType list_down(O_FUNC){
     return result->type;
 }
 
-ResultType list_iter(O_FUNC){
+static ResultType list_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     setResultCore(result);
@@ -339,7 +339,7 @@ ResultType list_iter(O_FUNC){
     return result->type;
 }
 
-ResultType listRepoStrCore(O_FUNC, bool is_repo){
+static ResultType listRepoStrCore(O_FUNC, bool is_repo){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo = NULL;
@@ -408,11 +408,11 @@ ResultType listRepoStrCore(O_FUNC, bool is_repo){
     return result->type;
 }
 
-ResultType list_repo(O_FUNC){
+static ResultType list_repo(O_FUNC){
     return listRepoStrCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType list_str(O_FUNC){
+static ResultType list_str(O_FUNC){
     return listRepoStrCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 

+ 2 - 2
vmcore/ofunc/src/listiter.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType listiter_init(O_FUNC){
+static ResultType listiter_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"list_", .must=1, .long_arg=false},
                            {.must=-1}};
@@ -29,7 +29,7 @@ ResultType listiter_init(O_FUNC){
     return result->type;
 }
 
-ResultType listiter_next(O_FUNC){
+static ResultType listiter_next(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *list_ = NULL;

+ 5 - 5
vmcore/ofunc/src/object.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType object_new(O_FUNC){
+static ResultType object_new(O_FUNC){
     LinkValue *value = NULL;
     setResultCore(result);
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
@@ -17,7 +17,7 @@ ResultType object_new(O_FUNC){
     return result->type;
 }
 
-#define OBJ_OPT(M_NAME_, NAME, FUNC) ResultType object_##FUNC (O_FUNC) {  \
+#define OBJ_OPT(M_NAME_, NAME, FUNC) static ResultType object_##FUNC (O_FUNC) {  \
     LinkValue *left, *right;  \
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},  \
                            {.type=name_value, .name=L"left", .must=1, .long_arg=false},  \
@@ -58,7 +58,7 @@ OBJ_OPT(BR, Bit Right, br)
 
 #undef OBJ_OPT
 
-ResultType object_eq (O_FUNC) {
+static ResultType object_eq (O_FUNC) {
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"left", .must=1, .long_arg=false},
                            {.type=name_value, .name=L"right", .must=1, .long_arg=false},
@@ -72,7 +72,7 @@ ResultType object_eq (O_FUNC) {
     return result->type;
 }
 
-ResultType object_noteq (O_FUNC) {
+static ResultType object_noteq (O_FUNC) {
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"left", .must=1, .long_arg=false},
                            {.type=name_value, .name=L"right", .must=1, .long_arg=false},
@@ -86,7 +86,7 @@ ResultType object_noteq (O_FUNC) {
     return result->type;
 }
 
-ResultType objectRepoStrCore(O_FUNC){
+static ResultType objectRepoStrCore(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo;

+ 1 - 1
vmcore/ofunc/src/pass.c

@@ -7,7 +7,7 @@ LinkValue *passCore(LinkValue *belong, LinkValue *class, Inter *inter) {
     return value;
 }
 
-ResultType pass_new(O_FUNC){
+static ResultType pass_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};

+ 2 - 2
vmcore/ofunc/src/pointer.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType pointer_new(O_FUNC){
+static ResultType pointer_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -19,7 +19,7 @@ ResultType pointer_new(O_FUNC){
     return result->type;
 }
 
-ResultType pointer_init(O_FUNC){
+static ResultType pointer_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"p", .must=0, .long_arg=false},
                            {.must=-1}};

+ 6 - 6
vmcore/ofunc/src/str.c

@@ -8,7 +8,7 @@ LinkValue *strCore(LinkValue *belong, LinkValue *class, Inter *inter) {
     return value;
 }
 
-ResultType str_new(O_FUNC){
+static ResultType str_new(O_FUNC){
     LinkValue *value = NULL;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -28,7 +28,7 @@ ResultType str_new(O_FUNC){
     return result->type;
 }
 
-ResultType str_init(O_FUNC){
+static ResultType str_init(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
                            {.must=-1}};
@@ -52,7 +52,7 @@ ResultType str_init(O_FUNC){
     return result->type;
 }
 
-ResultType str_slice(O_FUNC){
+static ResultType str_slice(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=0, .long_arg=false},
@@ -99,7 +99,7 @@ ResultType str_slice(O_FUNC){
     return result->type;
 }
 
-ResultType str_down(O_FUNC){
+static ResultType str_down(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
@@ -130,7 +130,7 @@ ResultType str_down(O_FUNC){
     return result->type;
 }
 
-ResultType str_to_list(O_FUNC){
+static ResultType str_to_list(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     vint size;
@@ -161,7 +161,7 @@ ResultType str_to_list(O_FUNC){
     return result->type;
 }
 
-ResultType str_iter(O_FUNC){
+static ResultType str_iter(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     LinkValue *to_list = NULL;

+ 38 - 38
vmcore/ofunc/src/sys.c

@@ -1,6 +1,6 @@
 #include "__ofunc.h"
 
-ResultType vm_super(O_FUNC){
+static ResultType vm_super(O_FUNC){
     Value *arg_father = NULL;
     Value *arg_child = NULL;
     LinkValue *next_father = NULL;
@@ -44,7 +44,7 @@ ResultType vm_super(O_FUNC){
     return result->type;
 }
 
-ResultType vm_setNowRunCore(O_FUNC, bool type){
+static ResultType vm_setNowRunCore(O_FUNC, bool type){
     LinkValue *function_value = NULL;
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     setResultCore(result);
@@ -62,7 +62,7 @@ ResultType vm_setNowRunCore(O_FUNC, bool type){
     return R_opt;
 }
 
-ResultType vm_setMethodCore(O_FUNC, enum FunctionPtType type){
+static ResultType vm_setMethodCore(O_FUNC, enum FunctionPtType type){
     LinkValue *function_value = NULL;
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     setResultCore(result);
@@ -80,79 +80,79 @@ ResultType vm_setMethodCore(O_FUNC, enum FunctionPtType type){
     return R_opt;
 }
 
-ResultType vm_cls(O_FUNC){
+static ResultType vm_cls(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_cls);
 }
 
-ResultType vm_func_cls(O_FUNC){
+static ResultType vm_func_cls(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_cls);
 }
 
-ResultType vm_no_(O_FUNC){
+static ResultType vm_no_(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_no_);
 }
 
-ResultType vm_func_(O_FUNC){
+static ResultType vm_func_(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_);
 }
 
-ResultType vm_func_class(O_FUNC){
+static ResultType vm_func_class(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_class);
 }
 
-ResultType vm_func_obj(O_FUNC){
+static ResultType vm_func_obj(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_obj);
 }
 
-ResultType vm_class(O_FUNC){
+static ResultType vm_class(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_class);
 }
 
-ResultType vm_obj(O_FUNC){
+static ResultType vm_obj(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_obj);
 }
 
-ResultType vm_all(O_FUNC){
+static ResultType vm_all(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_all);
 }
 
-ResultType vm_func_all(O_FUNC){
+static ResultType vm_func_all(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_all);
 }
 
-ResultType vm_cls_obj(O_FUNC){
+static ResultType vm_cls_obj(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_cls_obj);
 }
 
-ResultType vm_cls_class(O_FUNC){
+static ResultType vm_cls_class(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_cls_class);
 }
 
-ResultType vm_cls_all(O_FUNC){
+static ResultType vm_cls_all(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_cls_all);
 }
 
-ResultType vm_func_cls_obj(O_FUNC){
+static ResultType vm_func_cls_obj(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_cls_obj);
 }
 
-ResultType vm_func_cls_class(O_FUNC){
+static ResultType vm_func_cls_class(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_cls_class);
 }
 
-ResultType vm_func_cls_all(O_FUNC){
+static ResultType vm_func_cls_all(O_FUNC){
     return vm_setMethodCore(CO_FUNC(arg, var_list, result, belong), fp_func_cls_all);
 }
 
-ResultType vm_isnowrun(O_FUNC){
+static ResultType vm_isnowrun(O_FUNC){
     return vm_setNowRunCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType vm_disnowrun(O_FUNC){
+static ResultType vm_disnowrun(O_FUNC){
     return vm_setNowRunCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-ResultType vm_quit(O_FUNC){
+static ResultType vm_quit(O_FUNC){
     if (arg != NULL)
         setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
     else
@@ -160,11 +160,11 @@ ResultType vm_quit(O_FUNC){
     return R_error;
 }
 
-ResultType vm_open(O_FUNC){
+static ResultType vm_open(O_FUNC){
     return callBackCore(inter->data.base_obj[B_FILE], arg, LINEFILE, 0, CNEXT_NT);
 }
 
-ResultType vm_setAssert(O_FUNC, enum AssertRunType type){
+static ResultType vm_setAssert(O_FUNC, enum AssertRunType type){
     setResultCore(result);
     if (arg != NULL) {
         setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
@@ -176,19 +176,19 @@ ResultType vm_setAssert(O_FUNC, enum AssertRunType type){
     return result->type;
 }
 
-ResultType vm_assertignore(O_FUNC){
+static ResultType vm_assertignore(O_FUNC){
     return vm_setAssert(CO_FUNC(arg, var_list, result, belong), assert_ignore);
 }
 
-ResultType vm_assertrun(O_FUNC){
+static ResultType vm_assertrun(O_FUNC){
     return vm_setAssert(CO_FUNC(arg, var_list, result, belong), assert_run);
 }
 
-ResultType vm_assertraise(O_FUNC){
+static ResultType vm_assertraise(O_FUNC){
     return vm_setAssert(CO_FUNC(arg, var_list, result, belong), assert_raise);
 }
 
-ResultType vm_selfunCore(O_FUNC, bool type){
+static ResultType vm_selfunCore(O_FUNC, bool type){
     LinkValue *function_value = NULL;
     ArgumentParser ap[] = {{.type=name_value, .name=L"func", .must=1, .long_arg=false}, {.must=-1}};
     bool push;
@@ -216,15 +216,15 @@ ResultType vm_selfunCore(O_FUNC, bool type){
     return R_opt;
 }
 
-ResultType vm_selfun(O_FUNC){
+static ResultType vm_selfun(O_FUNC){
     return vm_selfunCore(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-ResultType vm_nselfun(O_FUNC){
+static ResultType vm_nselfun(O_FUNC){
     return vm_selfunCore(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType vm_setfreemode(O_FUNC, bool type){
+static ResultType vm_setfreemode(O_FUNC, bool type){
     setResultCore(result);
     if (arg != NULL) {
         setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
@@ -236,15 +236,15 @@ ResultType vm_setfreemode(O_FUNC, bool type){
     return result->type;
 }
 
-ResultType vm_freemode(O_FUNC){
+static ResultType vm_freemode(O_FUNC){
     return vm_setfreemode(CO_FUNC(arg, var_list, result, belong), true);
 }
 
-ResultType vm_nfreemode(O_FUNC){
+static ResultType vm_nfreemode(O_FUNC){
     return vm_setfreemode(CO_FUNC(arg, var_list, result, belong), false);
 }
 
-ResultType vm_opt_mode(O_FUNC, enum OptMode mode){
+static ResultType vm_opt_mode(O_FUNC, enum OptMode mode){
     setResultCore(result);
     if (arg != NULL) {
         setResultError(E_ArgumentException, MANY_ARG, LINEFILE, true, CNEXT_NT);
@@ -256,19 +256,19 @@ ResultType vm_opt_mode(O_FUNC, enum OptMode mode){
     return result->type;
 }
 
-ResultType vm_free_opt(O_FUNC){
+static ResultType vm_free_opt(O_FUNC){
     return vm_opt_mode(CO_FUNC(arg, var_list, result, belong), om_free);
 }
 
-ResultType vm_normal_opt(O_FUNC){
+static ResultType vm_normal_opt(O_FUNC){
     return vm_opt_mode(CO_FUNC(arg, var_list, result, belong), om_normal);
 }
 
-ResultType vm_simple_opt(O_FUNC){
+static ResultType vm_simple_opt(O_FUNC){
     return vm_opt_mode(CO_FUNC(arg, var_list, result, belong), om_simple);
 }
 
-ResultType vm_exec(O_FUNC){
+static ResultType vm_exec(O_FUNC){
     ArgumentParser ap[] = {{.type=name_value, .name=L"cm", .must=1, .long_arg=false},
                            {.type=name_value, .name=L"var", .must=0, .long_arg=false},
                            {.type=name_value, .name=L"out", .must=0, .long_arg=false},

+ 5 - 5
vmcore/ofunc/src/vobject.c

@@ -202,7 +202,7 @@ COMPAREMACRO(<=, LESSEQ, lesseq, Less Eq)
 COMPAREMACRO(<, LESS, less, Less Eq)
 #undef COMPAREMACRO
 
-ResultType vobject_opt_core(O_FUNC, base_opt func){
+static ResultType vobject_opt_core(O_FUNC, base_opt func){
     LinkValue *left;
     LinkValue *right;
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
@@ -290,7 +290,7 @@ void vobject_bnot_base(FUNC_VOBJR) {
     }
 }
 
-ResultType vobject_negate(O_FUNC){
+static ResultType vobject_negate(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"val", .must=1, .long_arg=false},
                            {.must=-1}};
@@ -304,7 +304,7 @@ ResultType vobject_negate(O_FUNC){
     return result->type;
 }
 
-ResultType vobject_bnot(O_FUNC){
+static ResultType vobject_bnot(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.type=name_value, .name=L"val", .must=1, .long_arg=false},
                            {.must=-1}};
@@ -318,7 +318,7 @@ ResultType vobject_bnot(O_FUNC){
     return result->type;
 }
 
-ResultType vobject_bool(O_FUNC){
+static ResultType vobject_bool(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     bool result_ = false;
@@ -370,7 +370,7 @@ ResultType vobject_bool(O_FUNC){
     return result->type;
 }
 
-ResultType vobject_repo(O_FUNC){
+static ResultType vobject_repo(O_FUNC){
     ArgumentParser ap[] = {{.type=only_value, .must=1, .long_arg=false},
                            {.must=-1}};
     wchar_t *repo = NULL;