Set the value at pos, using the configured encoding. */
| 80 | |
| 81 | /* Set the value at pos, using the configured encoding. */ |
| 82 | static void _intsetSet(intset *is, int pos, int64_t value) { |
| 83 | uint32_t encoding = intrev32ifbe(is->encoding); |
| 84 | |
| 85 | if (encoding == INTSET_ENC_INT64) { |
| 86 | ((int64_t*)is->contents)[pos] = value; |
| 87 | memrev64ifbe(((int64_t*)is->contents)+pos); |
| 88 | } else if (encoding == INTSET_ENC_INT32) { |
| 89 | ((int32_t*)is->contents)[pos] = value; |
| 90 | memrev32ifbe(((int32_t*)is->contents)+pos); |
| 91 | } else { |
| 92 | ((int16_t*)is->contents)[pos] = value; |
| 93 | memrev16ifbe(((int16_t*)is->contents)+pos); |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | /* Create an empty intset. */ |
| 98 | intset *intsetNew(void) { |
no outgoing calls
no test coverage detected