Commit fed8a17c authored by Chuck Lever's avatar Chuck Lever

xdrgen: typedefs should use the built-in string and opaque functions

'typedef opaque yada<XYZ>' should use xdrgen's built-in opaque
encoder and decoder, to enable better compiler optimization.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 663ad8b1
......@@ -13,5 +13,5 @@ xdrgen_decode_{{ name }}(struct xdr_stream *xdr, {{ classifier }}{{ name }} *ptr
{% if annotate %}
/* (variable-length opaque) */
{% endif %}
return xdr_stream_decode_opaque(xdr, ptr->data, ptr->len) >= 0;
return xdrgen_decode_opaque(xdr, ptr, {{ maxsize }});
};
......@@ -13,5 +13,5 @@ xdrgen_decode_{{ name }}(struct xdr_stream *xdr, {{ classifier }}{{ name }} *ptr
{% if annotate %}
/* (variable-length string) */
{% endif %}
return xdr_stream_decode_opaque(xdr, ptr->data, ptr->len) >= 0;
return xdrgen_decode_string(xdr, ptr, {{ maxsize }});
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment