mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-27 23:10:20 +02:00
Added msgpack prefix to erb template files.
The files that are generated by preprocess have already have the prefix.
This commit is contained in:
parent
62be3f1212
commit
ad5da7f131
@ -90,7 +90,7 @@ struct define<> {
|
||||
}
|
||||
void msgpack_unpack(msgpack::object const& o)
|
||||
{
|
||||
if(o.type != msgpack::type::ARRAY) { throw type_error(); }
|
||||
if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }
|
||||
}
|
||||
void msgpack_object(msgpack::object* o, msgpack::zone&) const
|
||||
{
|
||||
@ -115,7 +115,7 @@ struct define<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> {
|
||||
}
|
||||
void msgpack_unpack(msgpack::object const& o)
|
||||
{
|
||||
if(o.type != msgpack::type::ARRAY) { throw type_error(); }
|
||||
if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }
|
||||
const size_t size = o.via.array.size;
|
||||
if(size > 0) {
|
||||
msgpack::object *ptr = o.via.array.ptr;
|
||||
|
@ -139,7 +139,7 @@ inline tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(typename tuple_type<
|
||||
inline msgpack::object const& operator>> (
|
||||
msgpack::object const& o,
|
||||
type::tuple<>&) {
|
||||
if(o.type != msgpack::type::ARRAY) { throw type_error(); }
|
||||
if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }
|
||||
return o;
|
||||
}
|
||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||
@ -147,8 +147,8 @@ template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
||||
inline msgpack::object const& operator>> (
|
||||
msgpack::object const& o,
|
||||
type::tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>>& v) {
|
||||
if(o.type != msgpack::type::ARRAY) { throw type_error(); }
|
||||
if(o.via.array.size < <%=i+1%>) { throw type_error(); }
|
||||
if(o.type != msgpack::type::ARRAY) { throw msgpack::type_error(); }
|
||||
if(o.via.array.size < <%=i+1%>) { throw msgpack::type_error(); }
|
||||
<%0.upto(i) {|j|%>
|
||||
o.via.array.ptr[<%=j%>].convert<typename type::tuple_type<A<%=j%>>::type>(v.template get<<%=j%>>());<%}%>
|
||||
return o;
|
||||
|
Loading…
x
Reference in New Issue
Block a user