Lines Matching refs:sk
35 OPENSSL_sk_compfunc OPENSSL_sk_set_cmp_func(OPENSSL_STACK *sk, in OPENSSL_sk_set_cmp_func() argument
38 OPENSSL_sk_compfunc old = sk->comp; in OPENSSL_sk_set_cmp_func()
40 if (sk->comp != c) in OPENSSL_sk_set_cmp_func()
41 sk->sorted = 0; in OPENSSL_sk_set_cmp_func()
42 sk->comp = c; in OPENSSL_sk_set_cmp_func()
47 OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *sk) in OPENSSL_sk_dup() argument
54 if (sk == NULL) { in OPENSSL_sk_dup()
60 *ret = *sk; in OPENSSL_sk_dup()
63 if (sk == NULL || sk->num == 0) { in OPENSSL_sk_dup()
71 ret->data = OPENSSL_malloc(sizeof(*ret->data) * sk->num_alloc); in OPENSSL_sk_dup()
74 memcpy(ret->data, sk->data, sizeof(void *) * sk->num); in OPENSSL_sk_dup()
82 OPENSSL_STACK *OPENSSL_sk_deep_copy(const OPENSSL_STACK *sk, in OPENSSL_sk_deep_copy() argument
92 if (sk == NULL) { in OPENSSL_sk_deep_copy()
98 *ret = *sk; in OPENSSL_sk_deep_copy()
101 if (sk == NULL || sk->num == 0) { in OPENSSL_sk_deep_copy()
108 ret->num_alloc = sk->num > min_nodes ? sk->num : min_nodes; in OPENSSL_sk_deep_copy()
114 if (sk->data[i] == NULL) in OPENSSL_sk_deep_copy()
116 if ((ret->data[i] = copy_func(sk->data[i])) == NULL) { in OPENSSL_sk_deep_copy()