Skip to content

Commit 00acaa0

Browse files
committed
[cmake] Adjust h5 serialization code for use with standalone h5 repository
1 parent 5efea92 commit 00acaa0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp2py/mako/wrap.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ using ${ns};
4444
%endif
4545
%endfor
4646
%if include_serialization==1 :
47-
#include <triqs/h5/serialization.hpp>
47+
#include <h5/serialization.hpp>
4848
%endif
4949

5050
using namespace cpp2py;
@@ -721,15 +721,15 @@ static PyObject* ${c.py_type}___reduce__ (PyObject *self, PyObject *args, PyObje
721721
"Cannot find the reconstruction function ${module.full_name}.__reduce_reconstructor__${c.py_type}");
722722
return NULL;
723723
}
724-
return Py_BuildValue("(NN)", r.new_ref() , Py_BuildValue("(N)", convert_to_python(triqs::h5::serialize(self_c))));
724+
return Py_BuildValue("(NN)", r.new_ref() , Py_BuildValue("(N)", convert_to_python(h5::serialize(self_c))));
725725
}
726726

727727
//
728728
static PyObject* ${c.py_type}___reduce_reconstructor__ (PyObject *self, PyObject *args, PyObject *keywds) {
729729
PyObject* a1 = PyTuple_GetItem(args,0); //
730-
auto a = convert_from_python<triqs::arrays::array_const_view<triqs::h5::h5_serialization_char_t,1>>(a1);
730+
auto a = convert_from_python<std::vector<unsigned char>>(a1);
731731
try {
732-
return convert_to_python( triqs::h5::deserialize<${c.c_type}>(a));
732+
return convert_to_python( h5::deserialize<${c.c_type}>(a));
733733
}
734734
CATCH_AND_RETURN("in unserialization of object ${c.py_type}",NULL);
735735
}

0 commit comments

Comments
 (0)