• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
iOS datatype size change in 10.x SDK?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iOS datatype size change in 10.x SDK?


  • Subject: iOS datatype size change in 10.x SDK?
  • From: Carl Hoefs <email@hidden>
  • Date: Tue, 07 Feb 2017 13:14:02 -0700

When building for an iOS 9.x device using the iOS 9.x SDK, the datatypes long, size_t, and NSInteger have 4-byte representations[1]. But when building for an iOS 9.x device using the iOS 10.x SDK, the datatypes long, size_t, and NSInteger all have 8-byte representations!

     *     Datatype   9.x SDK   10.x SDK    Notes
     * ------------   -------   --------  ----------
     *         bool:  1 byte    1 byte
     *          int:  4 bytes   4 bytes
     *         long:  4 bytes   8 bytes   <- changed
     *    long long:  8 bytes   8 bytes
     *       double:  8 bytes   8 bytes
     *        float:  4 bytes   4 bytes
     *       size_t:  4 bytes   8 bytes   <- changed
     *    NSInteger:  4 bytes   8 bytes   <- changed

Are there other datatypes that have changed? Are these changes documented anywhere?
-Carl

[1]: Using sizeof(long), etc, and run on the iPhone, not simulator.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: iOS datatype size change in 10.x SDK?
      • From: Quincey Morris <email@hidden>
    • Re: iOS datatype size change in 10.x SDK?
      • From: Jonas Maebe <email@hidden>
  • Prev by Date: Re: Xcode 3.2.6 to the latest Xcode - what might I lose?
  • Next by Date: Re: iOS datatype size change in 10.x SDK?
  • Previous by thread: Re: Installable Command Line Tool
  • Next by thread: Re: iOS datatype size change in 10.x SDK?
  • Index(es):
    • Date
    • Thread