* Gets the underlying value pointed to by the current array writer. */
| 1187 | * Gets the underlying value pointed to by the current array writer. |
| 1188 | */ |
| 1189 | bson_value_t |
| 1190 | PgbsonArrayWriterGetValue(pgbson_array_writer *writer) |
| 1191 | { |
| 1192 | const uint8_t *bytes = bson_get_data(&writer->innerBson); |
| 1193 | bson_value_t value = { |
| 1194 | .value_type = BSON_TYPE_ARRAY, |
| 1195 | .value.v_doc.data = (uint8_t *) bytes, |
| 1196 | .value.v_doc.data_len = writer->innerBson.len |
| 1197 | }; |
| 1198 | |
| 1199 | return value; |
| 1200 | } |
| 1201 | |
| 1202 | |
| 1203 | /* Allocates the necessary memory on the target bson_value_t and copies using memcpy the data |
no outgoing calls
no test coverage detected