summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-29 15:35:20 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-29 15:35:20 -0500
commit08f65eeadc288ecde4b8fb281e477958c8ae7cd5 (patch)
treed16320cdc4a6b9b5c475dc83106368a81362ca3e /src
parentef7cab0830637828334fae0a9ad37d20f8e75176 (diff)
downloadfork-ledger-08f65eeadc288ecde4b8fb281e477958c8ae7cd5.tar.gz
fork-ledger-08f65eeadc288ecde4b8fb281e477958c8ae7cd5.tar.bz2
fork-ledger-08f65eeadc288ecde4b8fb281e477958c8ae7cd5.zip
Allow serialization to be enabled again
Diffstat (limited to 'src')
-rw-r--r--src/scope.h2
-rw-r--r--src/system.hh.in13
-rw-r--r--src/xact.h15
3 files changed, 26 insertions, 4 deletions
diff --git a/src/scope.h b/src/scope.h
index acaf7194..c43d73d6 100644
--- a/src/scope.h
+++ b/src/scope.h
@@ -483,7 +483,7 @@ public:
#if defined(HAVE_BOOST_SERIALIZATION)
protected:
- explicit call_scope_t() {
+ explicit call_scope_t() : depth(0) {
TRACE_CTOR(call_scope_t, "");
}
diff --git a/src/system.hh.in b/src/system.hh.in
index a38deb1f..552a591a 100644
--- a/src/system.hh.in
+++ b/src/system.hh.in
@@ -246,12 +246,19 @@ void serialize(Archive& ar, boost::intrusive_ptr<T>& ptr, const unsigned int)
}
}
-template <class Archive, class T>
-void serialize(Archive&, boost::function<T>&, const unsigned int)
-{
+template <class Archive>
+void serialize(Archive&, boost::any&, const unsigned int) {
+ // jww (2012-03-29): Should we really ignore any fields entirely?
+ // These occur inside value_t::storage_t::data's variant.
}
template <class Archive>
+void serialize(Archive&, boost::blank&, const unsigned int) {}
+
+template <class Archive, class T>
+void serialize(Archive&, boost::function<T>&, const unsigned int) {}
+
+template <class Archive>
void serialize(Archive& ar, istream_pos_type& pos, const unsigned int)
{
ar & make_binary_object(&pos, sizeof(istream_pos_type));
diff --git a/src/xact.h b/src/xact.h
index df82258d..ce00242e 100644
--- a/src/xact.h
+++ b/src/xact.h
@@ -168,6 +168,21 @@ public:
bool _overwrite_existing)
: tag_data(_tag_data), overwrite_existing(_overwrite_existing),
apply_to_post(NULL) {}
+
+#if defined(HAVE_BOOST_SERIALIZATION)
+private:
+ /** Serialization. */
+ deferred_tag_data_t() : apply_to_post(NULL) {}
+
+ friend class boost::serialization::access;
+
+ template<class Archive>
+ void serialize(Archive& ar, const unsigned int /* version */) {
+ ar & tag_data;
+ ar & overwrite_existing;
+ ar & apply_to_post;
+ }
+#endif // HAVE_BOOST_SERIALIZATION
};
typedef std::list<deferred_tag_data_t> deferred_notes_list;