| 1130 | } |
| 1131 | |
| 1132 | void PiuContent_set_nameAux(PiuContent* self) |
| 1133 | { |
| 1134 | xsMachine *the = (*self)->the; |
| 1135 | size_t nameLength = (xsUndefinedType == xsTypeOf(xsResult)) ? 0 : PiuRecordSize(1 + c_strlen(fxToString(the, &xsResult))); |
| 1136 | size_t current = (*self)->nameOffset ? (*self)->nameOffset : (*self)->recordSize; |
| 1137 | |
| 1138 | void *chunk = fxRenewChunk(the, *self, (xsIntegerValue)(current + nameLength)); |
| 1139 | if (!chunk) { |
| 1140 | chunk = fxNewChunk(the, (xsIntegerValue)(current + nameLength)); |
| 1141 | c_memcpy(chunk, *self, current); |
| 1142 | *self = chunk; |
| 1143 | } |
| 1144 | |
| 1145 | (*self)->recordSize = (uint32_t)(current + nameLength); |
| 1146 | if (nameLength) { |
| 1147 | (*self)->nameOffset = (uint32_t)current; |
| 1148 | c_strcpy(((char *)*self) + current, fxToString(the, &xsResult)); |
| 1149 | } |
| 1150 | else |
| 1151 | (*self)->nameOffset = 0; |
| 1152 | } |
| 1153 | |
| 1154 | void PiuContent_set_offset(xsMachine *the) |
| 1155 | { |
no test coverage detected