| 62 | } |
| 63 | |
| 64 | CScriptArray* CScriptArray::Create(asITypeInfo *ti, asUINT length) |
| 65 | { |
| 66 | // Allocate the memory |
| 67 | void *mem = userAlloc(sizeof(CScriptArray)); |
| 68 | if( mem == 0 ) |
| 69 | { |
| 70 | asIScriptContext *ctx = asGetActiveContext(); |
| 71 | if( ctx ) |
| 72 | ctx->SetException("Out of memory"); |
| 73 | |
| 74 | return 0; |
| 75 | } |
| 76 | |
| 77 | // Initialize the object |
| 78 | CScriptArray *a = new(mem) CScriptArray(length, ti); |
| 79 | |
| 80 | return a; |
| 81 | } |
| 82 | |
| 83 | CScriptArray* CScriptArray::Create(asITypeInfo *ti, void *initList) |
| 84 | { |
nothing calls this directly
no test coverage detected