Google is your friend:

http://man.he.net/man3/xdr

long *xdr_inline(XDR *xdrs, int len);

              A  macro that invokes the inline routine associated with the XDR
              stream, xdrs.  The routine returns a  pointer  to  a  contiguous
              piece  of  the  stream's  buffer;  len is the byte length of the
              desired buffer.  Note: pointer is cast to long *.

              Warning: xdr_inline() may return NULL (0) if it cannot  allocate
              a contiguous piece of a buffer.  Therefore the behavior may vary
              among stream instances; it exists for the sake of efficiency.


/be

Patrick Walton wrote:
On 8/2/13 1:46 PM, Brendan Eich wrote:
It's hard to beat raw buffer access. We shouldn't try to be too smart
here. Do we have *safe* raw buffer access options on the boards? (E.g.,
XDR inline from the old days: a way to ask for contiguous,
inline-function-deserializable memory?)

I'm not sure what XDR inline means, but you can allocate fixed-length buffers on the stack or inside any object in Rust.

Patrick

_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to