Search code examples
objective-ccocoamacosobjective-c++

Size already defined


I was messing with my Objective-C++ namespace today.

I found that Handle, Size and Duration are already defined in ObjC++. What are they defined to be and where are they defined?

I have only #imported Foundation/Foundation.h


Solution

  • MacTypes.h

    typedef char *                          Ptr;
    typedef Ptr *                           Handle;
    typedef long                            Size;
    typedef SInt32                          Duration;
    

    These all predate Carbon. They having nothing to do with Cocoa even though they fill up the namespace.