< Previous PageNext Page > Hide TOC

Mac OS X Version 10.5 Delta

The low-level Objective-C runtime API is significantly updated in Mac OS X version 10.5. Many functions and all existing data structures are replaced with new functions. This document describes the differences between the 10.5 version and previous versions.

Runtime Functions

Basic types

arith_t: Changed from int to intptr_t.

uarith_t: Changed from unsigned to uintptr_t.

Instances

The following functions are unchanged:

The following function is modified:

The following functions are added:

The following functions are deprecated:

Class Inspection

The following functions are unchanged:

The following function is modified:

The following functions are added:

The following functions are deprecated:

The following function is used only by ZeroLink:

Class Manipulation

The following function is unchanged:

The following functions are added:

The following functions are deprecated:

Methods

The following function is unchanged:

The following functions are added:

The following functions are deprecated:

Instance Variables

The following functions are added:

Selectors

The following functions are unchanged:

The following function is added:

The following function is deprecated:

Runtime

The following functions are deprecated favor of dyld:

The following functions are deprecated:

The following previously undocumented functions are deprecated with no substitute:

The following undocumented functions are unchanged:

Messaging

The following functions are unchanged:

The following functions are removed:

objc_msgSendvGiven an argument list, send a message with a simple return value.
objc_msgSendv_stretGiven an argument list, send a message with a data-structure return value.
objc_msgSendv_fpretGiven an argument list, send a message with a floating point return value.

Protocols

The following functions are added:

Exceptions

The following functions are unchanged:

Synchronization

The following functions are unchanged:

These functions are only used by the compiler.

NXHashTable and NXMapTable

NXHashTable and NXMapTable are unchanged. They are limited to 4 billion entries.

Structures

The objc_super struct is unchanged:

struct objc_super {
    id receiver;
    Class super_class;
};

All other structures deprecated in favor of opaque types and functional API. Substitutes are shown in the following tables.

Table A-1  Substitutions for objc_class

Variable

Substitution

struct objc_class *isa;

object_getClass(), object_setClass()

struct objc_class *super_class;

class_getSuperclass()

const char *name;

class_getName()

long version;

class_getVersion(), class_setVersion()

long info;

class_isMetaClass()

long instance_size;

no substitute

struct objc_ivar_list *ivars;

class_copyIvarList(), class_addIvar()

struct objc_method_list **methodLists;

class_copyMethodList(), class_addMethod()

struct objc_cache *cache;

no substitute

struct objc_protocol_list *protocols;

class_copyProtocolList(), class_addProtocol()

Table A-2  Substitutions for objc_method

Variable

Substitution

SEL method_name;

method_getName()

char *method_types;

method_getTypeEncoding()

IMP method_imp;

method_getImplementation(), method_setImplementation()

Table A-3  Substitutions for objc_ivar

Variable

Substitution

char *ivar_name;

ivar_getName()

char *ivar_type;

ivar_getTypeEncoding()

int ivar_offset;

ivar_getOffset()

There are no substitutes for the following structs:



< Previous PageNext Page > Hide TOC


© 2002, 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-11-19)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.