interface
| 260 | |
| 261 | // interface |
| 262 | void *asCGeneric::GetArgObject(asUINT arg) |
| 263 | { |
| 264 | if( arg >= (unsigned)sysFunction->parameterTypes.GetLength() ) |
| 265 | return 0; |
| 266 | |
| 267 | // Verify that the type is correct |
| 268 | asCDataType *dt = &sysFunction->parameterTypes[arg]; |
| 269 | if( !dt->IsObject() && !dt->IsFuncdef() ) |
| 270 | return 0; |
| 271 | |
| 272 | // Determine the position of the argument |
| 273 | int offset = 0; |
| 274 | for( asUINT n = 0; n < arg; n++ ) |
| 275 | offset += sysFunction->parameterTypes[n].GetSizeOnStackDWords(); |
| 276 | |
| 277 | // Get the value |
| 278 | return *(void**)(&stackPointer[offset]); |
| 279 | } |
| 280 | |
| 281 | // interface |
| 282 | void *asCGeneric::GetAddressOfArg(asUINT arg) |