CFDataSetLength

Header: CFData.h Carbon status: Supported

Resets the length of a mutable CFData object's internal byte buffer.

void CFDataSetLength (
    CFMutableDataRef data, 
    CFIndex length
);
Parameter descriptions
data

Pass a reference to a mutable CFData object. References to immutable CFData objects will cause indeterminate behavior.

length

An integer that specifies the new size of the CFData's byte buffer.

DISCUSSION

The CFDataSetLength function resets the length of a CFData's underlying byte buffer to a new size. If that size is less than the current size, it truncates the excess bytes. If that size is greater than the current sizse, it zero-fills the extension to the byte buffer. Trying to set the length past the capacity of a fixed-size mutable buffer can result in indeterminate behavior.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)