| 27 | }; |
| 28 | |
| 29 | void createBar() |
| 30 | { |
| 31 | asIScriptContext *ctx = gEngine->CreateContext(); |
| 32 | |
| 33 | asIScriptModule *module = gEngine->GetModule("script"); |
| 34 | gBarType = gEngine->GetTypeInfoById(module->GetTypeIdByDecl("Bar")); |
| 35 | asIScriptFunction *factory = gBarType->GetFactoryByDecl("Bar @Bar()"); |
| 36 | ctx->Prepare(factory); |
| 37 | ctx->Execute(); |
| 38 | gBar = *(asIScriptObject**)ctx->GetAddressOfReturnValue(); |
| 39 | gBar->AddRef(); |
| 40 | |
| 41 | ctx->Release(); |
| 42 | } |
| 43 | |
| 44 | void callMethodOfBar(){ |
| 45 | asIScriptContext* ctx = gEngine->CreateContext(); |
no test coverage detected