Resolve inherited method overloads across C3 MRO using full input signatures and own import path storage for the lifetime of the VM
Build / AerScript (push) Successful in 39s
Build / AerScript (push) Successful in 39s
This commit is contained in:
+8
-2
@@ -464,7 +464,10 @@ static sxi32 ProcessSourceFile(
|
||||
char *pFileDir, fFilePath[PATH_MAX + 1];
|
||||
char pFilePath[PATH_MAX + 1];
|
||||
/* Install local import path which is the current directory */
|
||||
ph7_vm_config(pVm, PH7_VM_CONFIG_IMPORT_PATH, "./");
|
||||
rc = ph7_vm_config(pVm, PH7_VM_CONFIG_IMPORT_PATH, "./");
|
||||
if(rc != PH7_OK) {
|
||||
goto Release;
|
||||
}
|
||||
if(zFilePath && SyRealPath(zFilePath, fFilePath) == PH7_OK) {
|
||||
rc = snprintf(pFilePath, sizeof(pFilePath) - 1, "%s", fFilePath);
|
||||
if(rc < 0) {
|
||||
@@ -474,7 +477,10 @@ static sxi32 ProcessSourceFile(
|
||||
pFileDir = (char *) PH7_ExtractDirName(fFilePath, SyStrlen(fFilePath), &iFileDir);
|
||||
pFileDir[iFileDir + 1] = '\0';
|
||||
/* Install local import path which is directory containing entry script */
|
||||
ph7_vm_config(pVm, PH7_VM_CONFIG_IMPORT_PATH, pFileDir);
|
||||
rc = ph7_vm_config(pVm, PH7_VM_CONFIG_IMPORT_PATH, pFileDir);
|
||||
if(rc != PH7_OK) {
|
||||
goto Release;
|
||||
}
|
||||
/* Push processed file path */
|
||||
PH7_VmPushFilePath(pVm, pFilePath, -1, TRUE, 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user