mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Remove PRI_PTR_COMPAT macros
This commit is contained in:
parent
4b61d60e80
commit
476e98b413
2 changed files with 6 additions and 4 deletions
5
NEWS
5
NEWS
|
@ -44,6 +44,11 @@ Removed Functionality
|
||||||
- The counter type was removed. This type was never fully functional/used
|
- The counter type was removed. This type was never fully functional/used
|
||||||
anywhere.
|
anywhere.
|
||||||
|
|
||||||
|
- Removed the PRI_PTR_COMPAT_INT, PRI_PTR_COMPAT_UINT, and PRI_SOURCE_ID
|
||||||
|
macros. There are no deprecation warnings for these because they were C
|
||||||
|
macros. Use the PRIdPTR and PRIuPTR macros from the standard library
|
||||||
|
instead.
|
||||||
|
|
||||||
Deprecated Functionality
|
Deprecated Functionality
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
|
|
|
@ -82,14 +82,12 @@ typedef int8_t int8;
|
||||||
// pointer size. They can be cast safely to a pointer, e.g. in Lists,
|
// pointer size. They can be cast safely to a pointer, e.g. in Lists,
|
||||||
// which represent their entities as void* pointers.
|
// which represent their entities as void* pointers.
|
||||||
//
|
//
|
||||||
#define PRI_PTR_COMPAT_INT PRIdPTR // Format to use with printf.
|
|
||||||
#define PRI_PTR_COMPAT_UINT PRIuPTR
|
|
||||||
#if SIZEOF_VOID_P == 8
|
#if SIZEOF_VOID_P == 8
|
||||||
typedef uint64_t ptr_compat_uint [[deprecated("Remove in v4.1. Use std::uintptr_t.")]];
|
typedef uint64_t ptr_compat_uint [[deprecated("Remove in v4.1. Use std::uintptr_t.")]];
|
||||||
typedef int64_t ptr_compat_int [[deprecated("Remove in v4.1. Use std::intptr_t.")]];
|
typedef int64_t ptr_compat_int [[deprecated("Remove in v4.1. Use std::intptr_t.")]];
|
||||||
#elif SIZEOF_VOID_P == 4
|
#elif SIZEOF_VOID_P == 4
|
||||||
typedef uint32_t ptr_compat_uint [[deprecated("Remove in v4.1. Use std::uintptr_t")]];
|
typedef uint32_t ptr_compat_uint [[deprecated("Remove in v4.1. Use std::uintptr_t")]];
|
||||||
typedef int32_t ptr_compat_int [[deprecated("Remove in v4.1. Use std::iintptr_t")]];
|
typedef int32_t ptr_compat_int [[deprecated("Remove in v4.1. Use std::intptr_t")]];
|
||||||
#else
|
#else
|
||||||
# error "Unsupported pointer size."
|
# error "Unsupported pointer size."
|
||||||
#endif
|
#endif
|
||||||
|
@ -224,7 +222,6 @@ void set_thread_name(const char* name, pthread_t tid = pthread_self());
|
||||||
// the obvious places (like Event.h or RemoteSerializer.h)
|
// the obvious places (like Event.h or RemoteSerializer.h)
|
||||||
|
|
||||||
using SourceID = std::uintptr_t;
|
using SourceID = std::uintptr_t;
|
||||||
#define PRI_SOURCE_ID PRI_PTR_COMPAT_UINT
|
|
||||||
constexpr SourceID SOURCE_LOCAL = 0;
|
constexpr SourceID SOURCE_LOCAL = 0;
|
||||||
|
|
||||||
// TODO: This is a temporary marker to flag events coming in via Broker.
|
// TODO: This is a temporary marker to flag events coming in via Broker.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue