- 0C9BC8280A5657728CB63DA6F822999A40C0791D9C81DAAA779181A5A1B241B1130A088B280A0A74777D27DB144978D15E43BA21BCCE68CE4D202767BD19E297
+ FA08E3A8029453DCA3E5DD6CA382EF541294CE5A7F914975B376F87C4EAE2DA55B8CA6CEA65343BA93E55F39956C4448E96B794CE39B799D65FD100E555262E7
bitcoin/src/serialize.h
(19 . 27)(19 . 9)
519 #include <boost/tuple/tuple_comparison.hpp>
520 #include <boost/tuple/tuple_io.hpp>
521
522 #if defined(_MSC_VER) || defined(__BORLANDC__)
523 typedef __int64 int64;
524 typedef unsigned __int64 uint64;
525 #else
526 typedef long long int64;
527 typedef unsigned long long uint64;
528 #endif
529 #if defined(_MSC_VER) && _MSC_VER < 1300
530 #define for if (false) ; else for
531 #endif
532
533 #ifdef WIN32
534 #include <windows.h>
535 // This is used to attempt to keep keying material out of swap
536 // Note that VirtualLock does not provide this as a guarantee on Windows,
537 // but, in practice, memory that has been VirtualLock'd almost never gets written to
538 // the pagefile except in rare circumstances where memory is extremely low.
539 #include <windows.h>
540 #define mlock(p, n) VirtualLock((p), (n));
541 #define munlock(p, n) VirtualUnlock((p), (n));
542 #else
543 #include <sys/mman.h>
544 #include <limits.h>
545 /* This comes from limits.h if it's not defined there set a sane default */
(53 . 7)(35 . 6)
547 #define munlock(a,b) \
548 munlock(((void *)(((size_t)(a)) & (~((PAGESIZE)-1)))),\
549 (((((size_t)(a)) + (b) - 1) | ((PAGESIZE) - 1)) + 1) - (((size_t)(a)) & (~((PAGESIZE) - 1))))
550 #endif
551
552 class CScript;
553 class CDataStream;
(902 . 12)(883 . 10)
555 Init(nTypeIn, nVersionIn);
556 }
557
558 #if !defined(_MSC_VER) || _MSC_VER >= 1300
559 CDataStream(const char* pbegin, const char* pend, int nTypeIn=SER_NETWORK, int nVersionIn=VERSION) : vch(pbegin, pend)
560 {
561 Init(nTypeIn, nVersionIn);
562 }
563 #endif
564
565 CDataStream(const vector_type& vchIn, int nTypeIn=SER_NETWORK, int nVersionIn=VERSION) : vch(vchIn.begin(), vchIn.end())
566 {
(993 . 7)(972 . 6)
568 vch.insert(it, first, last);
569 }
570
571 #if !defined(_MSC_VER) || _MSC_VER >= 1300
572 void insert(iterator it, const char* first, const char* last)
573 {
574 if (it == vch.begin() + nReadPos && last - first <= nReadPos)
(1005 . 7)(983 . 6)
576 else
577 vch.insert(it, first, last);
578 }
579 #endif
580
581 iterator erase(iterator it)
582 {