| 118 | } |
| 119 | |
| 120 | void PiuLocals_set_language(xsMachine* the) |
| 121 | { |
| 122 | PiuLocals* self = PIU(Locals, xsThis); |
| 123 | char path[mxLocalsNameSize + 1 + mxLocalsLanguageSize + 4 + 1]; |
| 124 | size_t size; |
| 125 | xsStringValue string = xsToString(xsArg(0)); |
| 126 | if (c_strlen(string) > mxLocalsLanguageSize - 1) |
| 127 | xsRangeError("locals language too long: %s", string); |
| 128 | c_strcpy((*self)->language, string); |
| 129 | c_strcpy(path, (*self)->name); |
| 130 | c_strcat(path, "."); |
| 131 | c_strcat(path, (*self)->language); |
| 132 | c_strcat(path, ".mhr"); |
| 133 | (*self)->results = (int32_t *)fxGetResource(the, NULL, path, &size); |
| 134 | if (!(*self)->results) |
| 135 | xsURIError("locals language not found: %s", path); |
| 136 | } |
| 137 | |
| 138 | void PiuLocals_get(xsMachine* the) |
| 139 | { |
nothing calls this directly
no test coverage detected