* Validates that terms array has at least 'required' Datum entries * in its array of terms. */
| 1046 | * in its array of terms. |
| 1047 | */ |
| 1048 | inline static void |
| 1049 | EnsureTermCapacity(GinEntrySet *context, int32_t required) |
| 1050 | { |
| 1051 | int32_t requiredTotal = context->index + required; |
| 1052 | if (context->entryCapacity < requiredTotal) |
| 1053 | { |
| 1054 | context->entries = repalloc(context->entries, sizeof(Datum) * |
| 1055 | requiredTotal); |
| 1056 | context->entryCapacity = requiredTotal; |
| 1057 | } |
| 1058 | } |
| 1059 | |
| 1060 | |
| 1061 | /* |
no outgoing calls
no test coverage detected