| 351 | } |
| 352 | |
| 353 | bool ASContext::LoadExpectedFunctions() { |
| 354 | bool ok = true; |
| 355 | for (unsigned i = 0; i < expected_functions.size(); i++) { |
| 356 | asIScriptFunction *func = module.GetFunctionID(expected_functions[i].definition); |
| 357 | expected_functions[i].func_ptr = NULL; |
| 358 | expected_functions[i].unloaded = false; |
| 359 | if (func) { |
| 360 | expected_functions[i].func_ptr = func; |
| 361 | } else if (expected_functions[i].mandatory) { |
| 362 | LOGF << "Could not load mandatory function " << expected_functions[i].definition << std::endl; |
| 363 | ok = false; |
| 364 | } |
| 365 | } |
| 366 | return ok; |
| 367 | } |
| 368 | |
| 369 | bool ASContext::HasFunction(ASFunctionHandle handle) { |
| 370 | if (handle < 0) { |
no test coverage detected