diff options
author | Mike Buland <mike@xagasoft.com> | 2024-11-06 16:45:09 -0800 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2024-11-06 16:45:09 -0800 |
commit | 6c066b6bbd4a44ae7c5874abf6bd3a3e04f76b88 (patch) | |
tree | d6abea40ac9b1a194ab06a52e341b0452918ae40 /src/unstable | |
parent | 700d4bbcbf59c4447becbab21a6aa7204a8da2f4 (diff) | |
download | libbu++-6c066b6bbd4a44ae7c5874abf6bd3a3e04f76b88.tar.gz libbu++-6c066b6bbd4a44ae7c5874abf6bd3a3e04f76b88.tar.bz2 libbu++-6c066b6bbd4a44ae7c5874abf6bd3a3e04f76b88.tar.xz libbu++-6c066b6bbd4a44ae7c5874abf6bd3a3e04f76b88.zip |
Tests are back, minor fixes.
There is a cache tracking bug exposed in cachedel test, it is unclear if
this is a regression yet.
Diffstat (limited to 'src/unstable')
-rw-r--r-- | src/unstable/myriadcache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unstable/myriadcache.h b/src/unstable/myriadcache.h index f71f9b5..289ab05 100644 --- a/src/unstable/myriadcache.h +++ b/src/unstable/myriadcache.h | |||
@@ -108,13 +108,13 @@ namespace Bu | |||
108 | const keytype &k | 108 | const keytype &k |
109 | ) | 109 | ) |
110 | { | 110 | { |
111 | Bu::MyriadStream ms = mStore.openStream( hIndex.get( k ) ); | 111 | Bu::MyriadStream ms = mStore.open( hIndex.get( k ), Bu::Myriad::Read ); |
112 | return _cacheObjectLoad<keytype, obtype>( initObj, k, ms ); | 112 | return _cacheObjectLoad<keytype, obtype>( initObj, k, ms ); |
113 | } | 113 | } |
114 | 114 | ||
115 | virtual void _save( const obtype *o ) | 115 | virtual void _save( const obtype *o ) |
116 | { | 116 | { |
117 | Bu::MyriadStream ms = mStore.openStream( hIndex.get( o->getKey() ) ); | 117 | Bu::MyriadStream ms = mStore.open( hIndex.get( o->getKey() ), Bu::Myriad::WriteNew ); |
118 | _cacheObjectSave( ms, o ); | 118 | _cacheObjectSave( ms, o ); |
119 | ms.setSize( ms.tell() ); | 119 | ms.setSize( ms.tell() ); |
120 | 120 | ||
@@ -127,7 +127,7 @@ namespace Bu | |||
127 | if( !bStructureChanged ) | 127 | if( !bStructureChanged ) |
128 | return; | 128 | return; |
129 | 129 | ||
130 | Bu::MyriadStream ms = mStore.openStream( 1 ); | 130 | Bu::MyriadStream ms = mStore.open( 1, Bu::Myriad::WriteNew ); |
131 | Bu::Archive ar( ms, Bu::Archive::save ); | 131 | Bu::Archive ar( ms, Bu::Archive::save ); |
132 | ar << (uint8_t)0 << hIndex; | 132 | ar << (uint8_t)0 << hIndex; |
133 | ar.close(); | 133 | ar.close(); |