Mark the old sk symbols as deprecated

See if that helps discourage their use slightly. (Though pretty much all
the uses are problematic things like Rust and prebuilts, so they
probably won't notice.)

Change-Id: I012b68922d7b36e778488e7455908e81b3de15f7
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61905
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
chromium-stable
David Benjamin 1 year ago committed by Boringssl LUCI CQ
parent b1ff33d58e
commit f04fbf5b05
  1. 23
      include/openssl/stack.h

@ -337,27 +337,28 @@ OPENSSL_EXPORT OPENSSL_STACK *OPENSSL_sk_deep_copy(
typedef OPENSSL_STACK _STACK;
// The following functions call the corresponding |OPENSSL_sk_*| function.
OPENSSL_EXPORT OPENSSL_STACK *sk_new_null(void);
OPENSSL_EXPORT size_t sk_num(const OPENSSL_STACK *sk);
OPENSSL_EXPORT void *sk_value(const OPENSSL_STACK *sk, size_t i);
OPENSSL_EXPORT void sk_free(OPENSSL_STACK *sk);
OPENSSL_EXPORT size_t sk_push(OPENSSL_STACK *sk, void *p);
OPENSSL_EXPORT void *sk_pop(OPENSSL_STACK *sk);
OPENSSL_EXPORT OPENSSL_DEPRECATED OPENSSL_STACK *sk_new_null(void);
OPENSSL_EXPORT OPENSSL_DEPRECATED size_t sk_num(const OPENSSL_STACK *sk);
OPENSSL_EXPORT OPENSSL_DEPRECATED void *sk_value(const OPENSSL_STACK *sk,
size_t i);
OPENSSL_EXPORT OPENSSL_DEPRECATED void sk_free(OPENSSL_STACK *sk);
OPENSSL_EXPORT OPENSSL_DEPRECATED size_t sk_push(OPENSSL_STACK *sk, void *p);
OPENSSL_EXPORT OPENSSL_DEPRECATED void *sk_pop(OPENSSL_STACK *sk);
// sk_pop_free_ex calls |OPENSSL_sk_pop_free_ex|.
//
// TODO(b/291994116): Remove this.
OPENSSL_EXPORT void sk_pop_free_ex(OPENSSL_STACK *sk,
OPENSSL_sk_call_free_func call_free_func,
OPENSSL_sk_free_func free_func);
OPENSSL_EXPORT OPENSSL_DEPRECATED void sk_pop_free_ex(
OPENSSL_STACK *sk, OPENSSL_sk_call_free_func call_free_func,
OPENSSL_sk_free_func free_func);
// sk_pop_free behaves like |OPENSSL_sk_pop_free_ex| but performs an invalid
// function pointer cast. It exists because some existing callers called
// |sk_pop_free| directly.
//
// TODO(davidben): Migrate callers to bssl::UniquePtr and remove this.
OPENSSL_EXPORT void sk_pop_free(OPENSSL_STACK *sk,
OPENSSL_sk_free_func free_func);
OPENSSL_EXPORT OPENSSL_DEPRECATED void sk_pop_free(
OPENSSL_STACK *sk, OPENSSL_sk_free_func free_func);
#if !defined(BORINGSSL_NO_CXX)

Loading…
Cancel
Save