* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.1 1991/10/24 00:19:24 dennisg Exp dennisg $
+ $Header: /usr/user/dennis_glatting/ObjC/c-runtime/include/RCS/ObjC.h,v 0.2 1991/11/07 22:31:42 dennisg Exp dennisg $
$Author: dennisg $
- $Date: 1991/10/24 00:19:24 $
+ $Date: 1991/11/07 22:31:42 $
$Log: ObjC.h,v $
+ * Revision 0.2 1991/11/07 22:31:42 dennisg
+ * added copyleft.
+ *
* Revision 0.1 1991/10/24 00:19:24 dennisg
* Initial check in. Preliminary development stage.
*
#define YES (BOOL)1
#define NO (BOOL)0
- /* Defination of a
+ /* Definition of a
selector. Selectors are
really of type char*. The
- run-time uses strcmp() to
- locate selectors. */
-typedef STR SEL;
+ run-time hashes the
+ string's address to locate
+ the method. If the method
+ isn't in the hash table then
+ a search is made through the
+ class hierarchy using
+ strcmp() to locate the
+ method. */
+typedef struct objc_selector* SEL;
/* ObjC uses this typedef
for untyped instances. */
/* Prototype for method
functions. */
-typedef id ( *IMP )(
-#ifdef __STDC__
- id, SEL, ...
-#endif
-);
+typedef id ( *IMP )( id, SEL, ... );
/* Filer types used to
describe Ivars and
* module structure of the executable.
*/
typedef struct objc_module {
- u_long version; /* Unknown. */
- u_long size; /* Suspect this is
- sizeof(Module). It is always
- 16. */
+ u_long version; /* Compiler revision. */
+ u_long size; /* sizeof(Module). */
char* name; /* Name of the file where the
module was generated. The
name includes the path. */
*
* This structure is generated by the compiler in the
* executable and used by the run-time during normal
- * messaging operations. Therefore some definitions
- * don't make sense in some contexts.
+ * messaging operations. Therefore some members
+ * change type.
+ * The compiler generates "char* const" and places a string
+ * in the following member variables: isa and super_class.
*/
typedef struct objc_metaClass {
- char* isa; /* Always a pointer to the
- string "Object". */
- char* super_class; /* Name of the class's super
- class. */
- char* name; /* Name of the meta class. */
- long version; /* Unknown. */
- long info; /* Bit mask. See class masks
+ struct objc_metaClass* isa; /* Pointer to Object meta
+ class. */
+ struct objc_metaClass* super_class; /* Pointer to meta class's
+ super meta class. */
+ char* name; /* Name of the meta class. */
+ long version; /* Unknown. */
+ long info; /* Bit mask. See class masks
defined above. */
- long instance_size; /* Always 0 except for Object.
+ long instance_size; /* Always 0 except for Object.
Should be ignored. */
- IvarList_t ivars; /* Always NULL except for
+ IvarList_t ivars; /* Always NULL except for
Object. Should be ignored. */
- MethodList_t methods; /* Linked List of factory methods
+ MethodList_t methods; /* Linked List of factory methods
for the class. */
- Cache_t cache; /* Used to cache factory methods
+ Cache_t cache; /* Used to cache factory methods
defined for the class and its
super classes. Entries are
made to the cache as the
*
* This structure is generated by the compiler in the
* executable and used by the run-time during normal
- * messaging operations. Therefore some definitions
- * don't make sense in some contexts.
+ * messaging operations. Therefore some members
+ * change type.
+ * The compiler generates "char* const" and places a string
+ * in the following member variables: super_class.
*/
typedef struct objc_class {
- MetaClass_t isa; /* Pointer to the class's
+ MetaClass_t isa; /* Pointer to the class's
meta class. */
- char* super_class; /* Name of the class's super
- class. */
- char* name; /* Name of the class. */
- long version; /* Unknown. */
- long info; /* Bit mask. See class masks
+ struct objc_class* super_class; /* Pointer to the super
+ class. */
+ char* name; /* Name of the class. */
+ long version; /* Unknown. */
+ long info; /* Bit mask. See class masks
defined above. */
- long instance_size; /* Size in bytes of the class.
+ long instance_size; /* Size in bytes of the class.
The sum of the class definition
and all super class
definitions. */
- IvarList_t ivars; /* Pointer to a structure that
+ IvarList_t ivars; /* Pointer to a structure that
describes the instance
variables in the class
definition. NULL indicates
no instance variables. Does
not include super class
variables. */
- MethodList_t methods; /* Linked list of instance
+ MethodList_t methods; /* Linked list of instance
methods defined for the
class. */
- Cache_t cache; /* Used to cache instance methods
+ Cache_t cache; /* Used to cache instance methods
defined for the class and its
super classes. Entries are
made to the cache as the