Carbon


CFNumberCreate

Header: CFNumber.h Carbon status: Supported

Creates a CFNumber object using the specified value.

CFNumberRef CFNumberCreate (
    CFAllocatorRef allocator, 
    CFNumberType theType, 
    const void *valuePtr
);
allocator

The memory allocator you wish to use. Pass kCFAllocatorDefault to use the default allocator.

theType

A constant specifying the data type of the value to convert. See CFNumber Type Flags for a list of possible values.

valuePtr

A pointer to the value wish to convert.

function result

The newly created CFNumber object.0

DISCUSSION

The type specified in the call to CFNumberCreate is not necessarily preserved when creating a new CFNumber object. The CFNumber will be created using whatever internal storage type the creation function deems appropriate. Use the function CFNumberGetType to find out what type the CFNumber object used to store your value.

AVAILABILITY

Supported in Carbon. Available in CarbonLib 1.0 and later when CoreFoundationLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by CoreFoundationLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)