internal
| 916 | |
| 917 | // internal |
| 918 | void CScriptArray::CreateBuffer(SArrayBuffer **buf, asUINT numElements) |
| 919 | { |
| 920 | *buf = reinterpret_cast<SArrayBuffer*>(userAlloc(sizeof(SArrayBuffer)-1+elementSize*numElements)); |
| 921 | |
| 922 | if( *buf ) |
| 923 | { |
| 924 | (*buf)->numElements = numElements; |
| 925 | (*buf)->maxElements = numElements; |
| 926 | Construct(*buf, 0, numElements); |
| 927 | } |
| 928 | else |
| 929 | { |
| 930 | // Oops, out of memory |
| 931 | asIScriptContext *ctx = asGetActiveContext(); |
| 932 | if( ctx ) |
| 933 | ctx->SetException("Out of memory"); |
| 934 | } |
| 935 | } |
| 936 | |
| 937 | // internal |
| 938 | void CScriptArray::DeleteBuffer(SArrayBuffer *buf) |
nothing calls this directly
no test coverage detected