0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-04 10:07:27 -05:00
bitcoin-bitcoin-core/src/script
Wladimir J. van der Laan 0a8054e7cd
Merge #12731: Support serialization as another type without casting
818dc74 Support serialization as another type without casting (Pieter Wuille)

Pull request description:

  This adds a `READWRITEAS(type, obj)` macro which serializes `obj` as if it were converted to `const type&` when `const`, and to `type&` when non-`const`. No actual cast is involved, so this only works when this conversion can be done automatically.

  This makes it usable in serialization code that uses a single implementation for both serialization and deserializing, which doesn't know the constness of the object involved.

  This is a redo of #12712, using a slightly different interface.

Tree-SHA512: 262f0257284ff99b5ffaec9b997c194e221522ba35c3ac8eaa9bb344449d7ea0a314de254dc77449fa7aaa600f8cd9a24da65aade8c1ec6aa80c6e9a7bba5ca7
2018-04-10 20:54:33 +02:00
..
bitcoinconsensus.cpp Support deserializing into temporaries 2018-03-13 17:04:31 -07:00
bitcoinconsensus.h Fix missing or inconsistent include guards 2018-03-22 16:23:04 +01:00
interpreter.cpp Merge #12167: Make segwit failure due to CLEANSTACK violation return a SCRIPT_ERR_CLEANSTACK error code 2018-04-04 17:30:24 -07:00
interpreter.h scripted-diff: Convert 11 enums into scoped enums (C++11) 2018-03-09 15:03:40 +01:00
ismine.cpp scripted-diff: Convert 11 enums into scoped enums (C++11) 2018-03-09 15:03:40 +01:00
ismine.h scripted-diff: Convert 11 enums into scoped enums (C++11) 2018-03-09 15:03:40 +01:00
script.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
script.h Support serialization as another type without casting 2018-03-20 17:08:06 -07:00
script_error.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
script_error.h Increment MIT Licence copyright header year on files modified in 2016 2016-12-31 11:01:21 -07:00
sigcache.cpp Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
sigcache.h Increment MIT Licence copyright header year on files modified in 2017 2018-01-03 02:26:56 +09:00
sign.cpp Merge #12714: Introduce interface for signing providers 2018-03-27 20:20:55 +02:00
sign.h Introduce interface for signing providers 2018-03-25 13:26:57 -07:00
standard.cpp Assert CPubKey::ValidLength to the pubkey's header-relevent size 2018-02-16 12:30:26 -08:00
standard.h Merge #11403: SegWit wallet support 2018-01-10 20:55:41 -10:00