Apple Darwin Manuel d'utilisateur Page 36

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 68
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 35
These data types go by many names in various technology areas, but in terms of their underlying representation,
the affected data types are one of those shown in Data Type Changes (page 12). In addition, a number of
functions that use these base data types directly have been changed to use derived data types so that their
underlying type can vary between 32-bit and 64-bit environments.
There are four common situations in which data types differ in the 64-bit world:
32-bit int data types that need to hold pointers. Because a pointer is 64 bits in length, these uses of int
data types were changed to long data types.
32-bit int data types that could reasonably hold a larger data set in a 64-bit application. Because the
viable number of objects in a data set can be much larger in a 64-bit application, these have been changed
to long data types when it makes sense for such a large collection to exist. This determination varies on
an API-by-API basis.
32-bit long data types that represent part of a data structure whose size and structure must not change.
Because long is 64-bit on 64-bit architectures, these were changed to int to preserve compatibility.
32-bit long data types that represent counts, constants, or flags that cannot practically exceed the limits
of a 32-bit integer (for example, the window identifier). Because long is 64-bit on 64-bit architectures,
many such occurrences of long were changed to int where it does not make sense for a larger value to
ever occur. This determination varies between APIs.
For example, the data type URefCon is defined in 32-bit applications as:
typedef unsigned long URefCon;
and in 64-bit applications as:
typedef void *URefCon;
These changes, which are sprinkled throughout all of the functions and data types in nearly every technology
area, represent the vast majority of changes you will encounter.
New/Replaced/Deprecated APIs
In addition to API changes resulting from changes to the data types used in parameters and return values,
other technology areas are changing significantly in the 64-bit world. Most of these changes are specific to C
language APIs.
High-Level 64-Bit API Support
High-Level API Changes at a Glance
2012-12-13 | Copyright © 2004, 2012 Apple Inc. All Rights Reserved.
36
Vue de la page 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 67 68

Commentaires sur ces manuels

Pas de commentaire