]>
git.saurik.com Git - apple/objc4.git/blob - runtime/objc.h
   2  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. 
   4  * @APPLE_LICENSE_HEADER_START@ 
   6  * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved. 
   8  * This file contains Original Code and/or Modifications of Original Code 
   9  * as defined in and that are subject to the Apple Public Source License 
  10  * Version 2.0 (the 'License'). You may not use this file except in 
  11  * compliance with the License. Please obtain a copy of the License at 
  12  * http://www.opensource.apple.com/apsl/ and read it before using this 
  15  * The Original Code and all software distributed under the License are 
  16  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  17  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  18  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 
  19  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  20  * Please see the License for the specific language governing rights and 
  21  * limitations under the License. 
  23  * @APPLE_LICENSE_HEADER_END@ 
  27  *      Copyright 1988-1996, NeXT Software, Inc. 
  33 #import <objc/objc-api.h>               // for OBJC_EXPORT 
  35 typedef struct objc_class 
*Class
; 
  37 typedef struct objc_object 
{ 
  41 typedef struct objc_selector    
*SEL
;     
  42 typedef id                      (*IMP
)(id
, SEL
, ...);  
  43 typedef signed char             BOOL
;  
  44 // BOOL is explicitly signed so @encode(BOOL) == "c" rather than "C"  
  45 // even if -funsigned-char is used. 
  52 #define Nil 0           /* id of Nil class */ 
  56 #define nil 0           /* id of Nil instance */ 
  60 #if !defined(STRICT_OPENSTEP) 
  64 OBJC_EXPORT BOOL 
sel_isMapped(SEL sel
); 
  65 OBJC_EXPORT 
const char *sel_getName(SEL sel
); 
  66 OBJC_EXPORT SEL 
sel_getUid(const char *str
); 
  67 OBJC_EXPORT SEL 
sel_registerName(const char *str
); 
  68 OBJC_EXPORT 
const char *object_getClassName(id obj
); 
  69 OBJC_EXPORT 
void *object_getIndexedIvars(id obj
); 
  71 #define ISSELECTOR(sel) sel_isMapped(sel) 
  72 #define SELNAME(sel)    sel_getName(sel) 
  73 #define SELUID(str)     sel_getUid(str) 
  74 #define NAMEOF(obj)     object_getClassName(obj) 
  75 #define IV(obj)         object_getIndexedIvars(obj) 
  77 #if defined(__osf__) && defined(__alpha__) 
  79     typedef unsigned long uarith_t
; 
  80 #   define ARITH_SHIFT 32 
  83     typedef unsigned uarith_t
; 
  84 #   define ARITH_SHIFT 16 
  87 #endif  /* !STRICT_OPENSTEP */ 
  89 #endif /* _OBJC_OBJC_H_ */