This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
static size_t
qunique (void *array, size_t elements, size_t width, int(*
compare)(const void *, const void *))
static size_t
qunique_arg (void *array, size_t elements, size_t width, int(*
compare)(const void *, const void *, void *), void *
arg)
Function Documentation
◆ qunique()
static size_t qunique
(
void *
array,
size_t
elements,
size_t
width,
int(*)(const void *, const void *)
compare
)
inlinestatic
Definition at line 21 of file qunique.h.
23{
24 char *bytes = (char *) array;
27
28 if (elements <= 1)
29 return elements;
30
31 for (
i = 1,
j = 0;
i < elements; ++
i)
32 {
33 if (
compare(bytes +
i * width, bytes +
j * width) != 0 &&
35 memcpy(bytes +
j * width, bytes +
i * width, width);
36 }
37
39}
static int compare(const void *arg1, const void *arg2)
References compare(), i, and j.
Referenced by _bt_deadblocks(), aclmembers(), array_to_tsvector(), checkcondition_str(), generate_trgm(), generate_wildcard_trgm(), gtsvector_compress(), InitCatalogCache(), sort_snapshot(), TidListEval(), tsq_mcontains(), and tsvector_delete_by_indices().
◆ qunique_arg()
static size_t qunique_arg
(
void *
array,
size_t
elements,
size_t
width,
int(*)(const void *, const void *, void *)
compare,
void *
arg
)
inlinestatic