diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-26 10:43:01 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-11-26 10:44:42 +0100 |
commit | e6751ca68abdb15db0ad91a9040d7bc1a413ae31 (patch) | |
tree | 66275c62d8a579c18d9c6886a646f12620da3bb3 /src | |
parent | 70f9e33fa0b5a31c18e23442601b14910ba991bb (diff) | |
parent | 322317951f2764d3cb55eea7d34f950b9c54e01a (diff) |
Merge pull request #5361
3223179 libbitcoinconsensus: don't require any global constructors (Cory Fields)
Diffstat (limited to 'src')
-rw-r--r-- | src/script/interpreter.cpp | 15 | ||||
-rw-r--r-- | src/utilstrencodings.cpp | 10 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 5eda23731d..a10cefcc0b 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -17,13 +17,6 @@ using namespace std; typedef vector<unsigned char> valtype; -static const valtype vchFalse(0); -static const valtype vchZero(0); -static const valtype vchTrue(1, 1); -static const CScriptNum bnZero(0); -static const CScriptNum bnOne(1); -static const CScriptNum bnFalse(0); -static const CScriptNum bnTrue(1); namespace { @@ -239,6 +232,14 @@ bool static CheckMinimalPush(const valtype& data, opcodetype opcode) { bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror) { + static const CScriptNum bnZero(0); + static const CScriptNum bnOne(1); + static const CScriptNum bnFalse(0); + static const CScriptNum bnTrue(1); + static const valtype vchFalse(0); + static const valtype vchZero(0); + static const valtype vchTrue(1, 1); + CScript::const_iterator pc = script.begin(); CScript::const_iterator pend = script.end(); CScript::const_iterator pbegincodehash = script.begin(); diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp index a961b3c5cd..d0062d4544 100644 --- a/src/utilstrencodings.cpp +++ b/src/utilstrencodings.cpp @@ -14,13 +14,13 @@ using namespace std; -/** - * safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything - * even possibly remotely dangerous like & or > - */ -static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()"); string SanitizeString(const string& str) { + /** + * safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything + * even possibly remotely dangerous like & or > + */ + static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()"); string strResult; for (std::string::size_type i = 0; i < str.size(); i++) { |