changed the defs for class structures for new implementation of run-time.

changed def of SEL back to its original type.

From-SVN: r61
This commit is contained in:
Dennis Glatting 1991-11-16 15:57:35 +00:00
parent defc614f04
commit 5b54889788
1 changed files with 47 additions and 40 deletions

View File

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