migrate the entry at the given index in the source Record to the same index in the destination. Ownership is transferred according to transfer_ownership
| 12 | // migrate the entry at the given index in the source Record to the same index |
| 13 | // in the destination. Ownership is transferred according to transfer_ownership |
| 14 | static void _RecordPropagateEntry |
| 15 | ( |
| 16 | Record dest, |
| 17 | Record src, |
| 18 | uint idx, |
| 19 | bool transfer_ownership |
| 20 | ) { |
| 21 | // copy the entry |
| 22 | dest->entries[idx] = src->entries[idx]; |
| 23 | |
| 24 | // ownership is determined according to transfer_ownership |
| 25 | if(src->entries[idx].type == REC_TYPE_SCALAR) { |
| 26 | if(transfer_ownership) { |
| 27 | SIValue_MakeVolatile(&src->entries[idx].value.s); |
| 28 | } else { |
| 29 | SIValue_MakeVolatile(&dest->entries[idx].value.s); |
| 30 | } |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // this function is currently unused |
| 35 | Record Record_New |
no test coverage detected