* Bitwise OR the number stored in number to state and modifies state. */
| 309 | * Bitwise OR the number stored in number to state and modifies state. |
| 310 | */ |
| 311 | void |
| 312 | BitwiseOrToBsonValue(bson_value_t *state, const bson_value_t *number) |
| 313 | { |
| 314 | if (state->value_type == BSON_TYPE_INT64 || number->value_type == BSON_TYPE_INT64) |
| 315 | { |
| 316 | int64_t result = BsonValueAsInt64(state) | BsonValueAsInt64(number); |
| 317 | state->value.v_int64 = result; |
| 318 | state->value_type = BSON_TYPE_INT64; |
| 319 | } |
| 320 | else |
| 321 | { |
| 322 | int32_t result = state->value.v_int32 | number->value.v_int32; |
| 323 | state->value.v_int32 = result; |
| 324 | state->value_type = BSON_TYPE_INT32; |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | |
| 329 | /* |
no test coverage detected