My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/* Copyright (c) 2007 Christopher J. W. Lloyd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */

#import <objc/objc-export.h>
#import <objc/objc.h>
#import <stdint.h>

enum {
_C_ID='@',
_C_CHR='c',
_C_UCHR='C',
_C_INT='i',
_C_UINT='I',
_C_FLT='f',
_C_DBL='d',
_C_VOID='v',
_C_UNDEF='?',
_C_CLASS='#',
_C_SEL=':',
_C_CHARPTR='*',
_C_SHT='s',
_C_USHT='S',
_C_LNG='l',
_C_ULNG='L',
_C_LNGLNG='q',
_C_LNG_LNG=_C_LNGLNG,
_C_ULNGLNG='Q',
_C_ULNG_LNG=_C_ULNGLNG,
_C_BFLD='b',
_C_ARY_B='[',
_C_STRUCT_B='{',
_C_UNION_B='(',
_C_ARY_E=']',
_C_STRUCT_E='}',
_C_UNION_E=')',
_C_PTR='^',
_C_CONST='r',
_C_IN='n',
_C_INOUT='N',
_C_OUT='o',
_C_BYCOPY='R',
_C_ONEWAY='V',
};

struct objc_ivar {
char *ivar_name;
char *ivar_type;
int ivar_offset;
};

struct objc_ivar_list {
int ivar_count;
struct objc_ivar ivar_list[1];
};

struct objc_method {
SEL method_name;
char *method_types;
IMP method_imp;
};

struct objc_method_description {
SEL name;
char *types;
};

struct objc_method_list {
struct objc_method_list *obsolete;
int method_count;
struct objc_method method_list[1];
};

@class Protocol;

struct objc_protocol_list {
struct objc_protocol_list *next;
int count;
Protocol *list[1];
};

struct objc_category {
const char *name;
const char *className;
struct objc_method_list *instanceMethods;
struct objc_method_list *classMethods;
struct objc_protocol_list *protocols;
};

struct objc_property {
const char * const name;
const char * const attributes;
};

struct objc_prop_list_t {
uint32_t size;
uint32_t prop_count;
struct objc_property prop_list [1];
};

struct objc_class_extension {
uint32_t size;
const char *weak_ivar_layout;
struct objc_prop_list_t *properties;
};

struct objc_class {
struct objc_class *isa;
struct objc_class *super_class;
const char *name;
long version;
long info;
long instance_size;
struct objc_ivar_list *ivars;
struct objc_method_list **methodLists;
struct objc_cache *cache;
struct objc_protocol_list *protocols;
const char *ivar_layout;
struct objc_class_extension *ext;
};

Change log

b66cda1a7abd by Christopher Lloyd <c...@objc.net> on Oct 21, 2010   Diff
property and protocol functions in the
objc runtime
Go to: 
Project members, sign in to write a code review

Older revisions

b1ce6c5be34f by cocotron on Apr 23, 2009   Diff
- fix objc-class.h/Protocol.h from
previous commit
- change OBJCAllModulePaths to
objc_copyImageNames
- change OBJCModulePathFromClass to
...
af36fb700cd3 by cocotron on Apr 6, 2009   Diff
Updated towards Objective-C 2.0
runtime API and some decoupling of
objc runtime from Foundation
- added 2.0 objc/runtime.h, message.h
with most of the declarations
...
823607470c1f by johannes.fortmann on Feb 8, 2009   Diff
changed SEL type to char*
changed method lists to use an array
instead of a linked list
All revisions of this file

File info

Size: 3441 bytes, 125 lines
Powered by Google Project Hosting