Distinct maintains a set of values, if value `X` already in the set return NULL, otherwise `X` is returned and added to to the set.
| 79 | // if value `X` already in the set return NULL, |
| 80 | // otherwise `X` is returned and added to to the set. |
| 81 | SIValue AR_DISTINCT(SIValue *argv, int argc, void *private_data) { |
| 82 | set *set = private_data; |
| 83 | if(Set_Add(set, argv[0])) return SI_TransferOwnership(argv); |
| 84 | return SI_NullVal(); |
| 85 | } |
| 86 | |
| 87 | // Routine for freeing a Distinct function context. |
| 88 | void Distinct_Free(void *ctx_ptr) { |
nothing calls this directly
no test coverage detected