Remove CHECKED_CAST and CHECKED_PTR_OF.
This commit is contained in:
parent
47e7edc7db
commit
8c508ed4ac
@ -59,22 +59,6 @@
|
||||
|
||||
#include <openssl/base.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* This header file contains some common macros for enforcing type checking.
|
||||
* Several, common OpenSSL structures (i.e. stack and lhash) operate on void
|
||||
* pointers, but we wish to have type checking when they are used with a
|
||||
* specific type. */
|
||||
|
||||
/* CHECKED_CAST casts |p| from type |from| to type |to|. */
|
||||
#define CHECKED_CAST(to, from, p) ((to) (1 ? (p) : (from)0))
|
||||
|
||||
/* CHECKED_PTR_OF casts a given pointer to void* and statically checks that it
|
||||
* was a pointer to |type|. */
|
||||
#define CHECKED_PTR_OF(type, p) CHECKED_CAST(void*, type*, (p))
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
#define OPENSSL_COMPILE_ASSERT(cond, msg) _Static_assert(cond, #msg)
|
||||
@ -84,8 +68,4 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif /* OPENSSL_HEADER_TYPE_CHECK_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user