mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
GH-572: Mark MemoryAllocation() and related methods deprecated
This commit is contained in:
parent
e6e41ac5d9
commit
a7fd34375f
31 changed files with 158 additions and 6 deletions
5
src/RE.h
5
src/RE.h
|
@ -115,6 +115,7 @@ public:
|
|||
|
||||
void Dump(FILE* f);
|
||||
|
||||
[[deprecated("Remove in v5.1. MemoryAllocation() is deprecated and will be removed. See GHI-572.")]]
|
||||
unsigned int MemoryAllocation() const;
|
||||
|
||||
protected:
|
||||
|
@ -232,11 +233,15 @@ public:
|
|||
// the main ("explicit") constructor was used.
|
||||
const char* OrigText() const { return orig_text.c_str(); }
|
||||
|
||||
[[deprecated("Remove in v5.1. MemoryAllocation() is deprecated and will be removed. See GHI-572.")]]
|
||||
unsigned int MemoryAllocation() const
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
return padded_sizeof(*this)
|
||||
+ (re_anywhere ? re_anywhere->MemoryAllocation() : 0)
|
||||
+ (re_exact ? re_exact->MemoryAllocation() : 0);
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue