summaryrefslogtreecommitdiffstats
path: root/crypto/sparse_array.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-03-09 12:07:36 +1000
committerShane Lontis <shane.lontis@oracle.com>2021-03-18 17:52:37 +1000
commitff0266eddc34e3f00494651e76bf46e6501dfc0b (patch)
treeda2fd82d41c9c25bb875532a171c9aa565631343 /crypto/sparse_array.c
parent8a6e9125200223fa2294d3634d3dfec24857264b (diff)
Add ossl_sa symbols
Partial fix for #12964 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14473)
Diffstat (limited to 'crypto/sparse_array.c')
-rw-r--r--crypto/sparse_array.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/crypto/sparse_array.c b/crypto/sparse_array.c
index be4db2c620..3c20f1ea18 100644
--- a/crypto/sparse_array.c
+++ b/crypto/sparse_array.c
@@ -60,7 +60,7 @@ struct sparse_array_st {
void **nodes;
};
-OPENSSL_SA *OPENSSL_SA_new(void)
+OPENSSL_SA *ossl_sa_new(void)
{
OPENSSL_SA *res = OPENSSL_zalloc(sizeof(*res));
@@ -112,13 +112,13 @@ static void sa_free_leaf(ossl_uintmax_t n, void *p, void *arg)
OPENSSL_free(p);
}
-void OPENSSL_SA_free(OPENSSL_SA *sa)
+void ossl_sa_free(OPENSSL_SA *sa)
{
sa_doall(sa, &sa_free_node, NULL, NULL);
OPENSSL_free(sa);
}
-void OPENSSL_SA_free_leaves(OPENSSL_SA *sa)
+void ossl_sa_free_leaves(OPENSSL_SA *sa)
{
sa_doall(sa, &sa_free_node, &sa_free_leaf, NULL);
OPENSSL_free(sa);
@@ -134,8 +134,7 @@ static void trampoline(ossl_uintmax_t n, void *l, void *arg)
((const struct trampoline_st *)arg)->func(n, l);
}
-void OPENSSL_SA_doall(const OPENSSL_SA *sa, void (*leaf)(ossl_uintmax_t,
- void *))
+void ossl_sa_doall(const OPENSSL_SA *sa, void (*leaf)(ossl_uintmax_t, void *))
{
struct trampoline_st tramp;
@@ -144,7 +143,7 @@ void OPENSSL_SA_doall(const OPENSSL_SA *sa, void (*leaf)(ossl_uintmax_t,
sa_doall(sa, NULL, &trampoline, &tramp);
}
-void OPENSSL_SA_doall_arg(const OPENSSL_SA *sa,
+void ossl_sa_doall_arg(const OPENSSL_SA *sa,
void (*leaf)(ossl_uintmax_t, void *, void *),
void *arg)
{
@@ -152,12 +151,12 @@ void OPENSSL_SA_doall_arg(const OPENSSL_SA *sa,
sa_doall(sa, NULL, leaf, arg);
}
-size_t OPENSSL_SA_num(const OPENSSL_SA *sa)
+size_t ossl_sa_num(const OPENSSL_SA *sa)
{
return sa == NULL ? 0 : sa->nelem;
}
-void *OPENSSL_SA_get(const OPENSSL_SA *sa, ossl_uintmax_t n)
+void *ossl_sa_get(const OPENSSL_SA *sa, ossl_uintmax_t n)
{
int level;
void **p, *r = NULL;
@@ -180,7 +179,7 @@ static ossl_inline void **alloc_node(void)
return OPENSSL_zalloc(SA_BLOCK_MAX * sizeof(void *));
}
-int OPENSSL_SA_set(OPENSSL_SA *sa, ossl_uintmax_t posn, void *val)
+int ossl_sa_set(OPENSSL_SA *sa, ossl_uintmax_t posn, void *val)
{
int i, level = 1;
ossl_uintmax_t n = posn;