Skip to content

Commit 0a3e0af

Browse files
committed
Use RCPBasicAware{Output,Input}Archive
1 parent 7c48a0d commit 0a3e0af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

symengine/lib/pywrapper.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ PyObject* pickle_loads(const std::string &pickle_str) {
292292
return obj;
293293
}
294294

295-
RCP<const Basic> load_basic(cereal::PortableBinaryInputArchive &ar, RCP<const Symbol> &)
295+
RCP<const Basic> load_basic(RCPBasicAwareInputArchive<cereal::PortableBinaryInputArchive> &ar, RCP<const Symbol> &)
296296
{
297297
bool is_pysymbol;
298298
bool store_pickle;
@@ -324,7 +324,7 @@ std::string pickle_dumps(const PyObject * obj) {
324324
return std::string(buffer, size);
325325
}
326326

327-
void save_basic(cereal::PortableBinaryOutputArchive &ar, const Symbol &b)
327+
void save_basic(RCPBasicAwareOutputArchive<cereal::PortableBinaryOutputArchive> &ar, const Symbol &b)
328328
{
329329
bool is_pysymbol = is_a_sub<PySymbol>(b);
330330
ar(is_pysymbol);
@@ -344,7 +344,7 @@ std::string wrapper_dumps(const Basic &x)
344344
std::ostringstream oss;
345345
unsigned short major = SYMENGINE_MAJOR_VERSION;
346346
unsigned short minor = SYMENGINE_MINOR_VERSION;
347-
cereal::PortableBinaryOutputArchive{oss}(major, minor,
347+
RCPBasicAwareOutputArchive<cereal::PortableBinaryOutputArchive>{oss}(major, minor,
348348
x.rcp_from_this());
349349
return oss.str();
350350
}
@@ -354,7 +354,7 @@ RCP<const Basic> wrapper_loads(const std::string &serialized)
354354
unsigned short major, minor;
355355
RCP<const Basic> obj;
356356
std::istringstream iss(serialized);
357-
cereal::PortableBinaryInputArchive iarchive{iss};
357+
RCPBasicAwareInputArchive<cereal::PortableBinaryInputArchive> iarchive{iss};
358358
iarchive(major, minor);
359359
if (major != SYMENGINE_MAJOR_VERSION or minor != SYMENGINE_MINOR_VERSION) {
360360
throw SerializationError(StreamFmt()

0 commit comments

Comments
 (0)