aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-06-18 22:51:36 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-09-03 13:42:03 +0200
commitfa5c896724bb359b4b9a3f89580272bfe5980c1b (patch)
treef8c4bb086142504015a51320a74e1100dc876f96 /src/script
parentdd097c42df7378c9d0114c04c82b3c38c18e13dc (diff)
downloadbitcoin-fa5c896724bb359b4b9a3f89580272bfe5980c1b.tar.xz
Add LIFETIMEBOUND to CScript where needed
Diffstat (limited to 'src/script')
-rw-r--r--src/script/script.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/script/script.h b/src/script/script.h
index 974cde4984..8cd1cc3855 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -6,6 +6,7 @@
#ifndef BITCOIN_SCRIPT_SCRIPT_H
#define BITCOIN_SCRIPT_SCRIPT_H
+#include <attributes.h>
#include <crypto/common.h>
#include <prevector.h>
#include <serialize.h>
@@ -438,9 +439,9 @@ public:
/** Delete non-existent operator to defend against future introduction */
CScript& operator<<(const CScript& b) = delete;
- CScript& operator<<(int64_t b) { return push_int64(b); }
+ CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
- CScript& operator<<(opcodetype opcode)
+ CScript& operator<<(opcodetype opcode) LIFETIMEBOUND
{
if (opcode < 0 || opcode > 0xff)
throw std::runtime_error("CScript::operator<<(): invalid opcode");
@@ -448,13 +449,13 @@ public:
return *this;
}
- CScript& operator<<(const CScriptNum& b)
+ CScript& operator<<(const CScriptNum& b) LIFETIMEBOUND
{
*this << b.getvch();
return *this;
}
- CScript& operator<<(const std::vector<unsigned char>& b)
+ CScript& operator<<(const std::vector<unsigned char>& b) LIFETIMEBOUND
{
if (b.size() < OP_PUSHDATA1)
{