| 1034 | } |
| 1035 | |
| 1036 | txScript* fxLoadScript(txMachine* the, txString path) |
| 1037 | { |
| 1038 | txLinker* linker = (txLinker*)(the->context); |
| 1039 | txLinkerScript* linkerScript = linker->firstScript; |
| 1040 | while (linkerScript) { |
| 1041 | if (!c_strcmp(path, linkerScript->path)) { |
| 1042 | txScript* script = fxNewLinkerChunk(linker, sizeof(txScript)); |
| 1043 | script->callback = fxLinkerScriptCallback; |
| 1044 | script->symbolsBuffer = NULL; |
| 1045 | script->symbolsSize = 0; |
| 1046 | script->codeBuffer = linkerScript->codeBuffer; |
| 1047 | script->codeSize = linkerScript->codeSize; |
| 1048 | script->hostsBuffer = NULL; |
| 1049 | script->hostsSize = 0; |
| 1050 | script->path = linkerScript->path; |
| 1051 | script->version[0] = XS_MAJOR_VERSION; |
| 1052 | script->version[1] = XS_MINOR_VERSION; |
| 1053 | script->version[2] = XS_PATCH_VERSION; |
| 1054 | script->version[3] = 0; |
| 1055 | return script; |
| 1056 | } |
| 1057 | linkerScript = linkerScript->nextScript; |
| 1058 | } |
| 1059 | return C_NULL; |
| 1060 | } |
| 1061 | |
| 1062 | txScript* fxParseScript(txMachine* the, void* stream, txGetter getter, txUnsigned flags) |
| 1063 | { |
no test coverage detected