add obj_runFile() API

This commit is contained in:
Lyon 2023-07-11 16:45:24 +08:00
parent 0e4d927a5d
commit 0670172efd
2 changed files with 10 additions and 0 deletions

View File

@ -2620,6 +2620,14 @@ int obj_runModule(PikaObj* self, char* module_name) {
return 0;
}
PikaObj* obj_runFile(PikaObj* self, char* file_name) {
return pikaVM_runFile(self, file_name);
}
PikaObj* obj_runSingleFile(PikaObj* self, char* file_name) {
return pikaVM_runSingleFile(self, file_name);
}
int obj_importModule(PikaObj* self, char* module_name) {
if (NULL == module_name) {
return -1;

View File

@ -505,6 +505,8 @@ int obj_importModule(PikaObj* self, char* module_name);
int32_t obj_newMetaObj(PikaObj* self, char* objName, NewFun newFunPtr);
int32_t obj_newDirectObj(PikaObj* self, char* objName, NewFun newFunPtr);
int obj_runModule(PikaObj* self, char* module_name);
PikaObj* obj_runFile(PikaObj* self, char* file_name);
PikaObj* obj_runSingleFile(PikaObj* self, char* file_name);
char* obj_toStr(PikaObj* self);
Arg* arg_newDirectObj(NewFun new_obj_fun);
enum shellCTRL obj_runChar(PikaObj* self, char inputChar);