ObjFW  Check-in [51053dafc6]

Overview
Comment:Add introspection for instance variables for the old GNU runtime.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 51053dafc69ddbdc7cc2f8a6e6defcf91386cfb402f6faa5cea350d73f9450c1
User & Date: js on 2011-10-16 19:51:57
Other Links: manifest | tags
Context
2011-10-16
21:30
Add introspection for properties. check-in: cea0c66392 user: js tags: trunk
19:51
Add introspection for instance variables for the old GNU runtime. check-in: 51053dafc6 user: js tags: trunk
19:41
Add introspection for instance variables. check-in: 93a3badbb7 user: js tags: trunk
Changes

Modified src/OFIntrospection.m from [6a25e3dc19] to [57a446ae33].

114
115
116
117
118
119
120


















121
122
123
124
125
126
127
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}


















#endif

- (void)dealloc
{
	[name release];

	[super dealloc];







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
#elif defined(OF_OLD_GNU_RUNTIME)
- _initWithIvar: (Ivar_t)ivar
{
	self = [super init];

	@try {
		name = [[OFString alloc]
		    initWithCString: ivar->ivar_name
			   encoding: OF_STRING_ENCODING_ASCII];
		offset = ivar->ivar_offset;
		typeEncoding = ivar->ivar_type;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
#endif

- (void)dealloc
{
	[name release];

	[super dealloc];
227
228
229
230
231
232
233










234
235
236
237
238
239
240
			int i;

			for (i = 0; i < methodList->method_count; i++)
				[instanceMethods addObject: [[[OFMethod alloc]
				    _initWithMethod:
				    &methodList->method_list[i]] autorelease]];
		}










#endif

		[classMethods makeImmutable];
		[instanceMethods makeImmutable];
		[instanceVariables makeImmutable];

		[pool release];







>
>
>
>
>
>
>
>
>
>







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
			int i;

			for (i = 0; i < methodList->method_count; i++)
				[instanceMethods addObject: [[[OFMethod alloc]
				    _initWithMethod:
				    &methodList->method_list[i]] autorelease]];
		}

		if (class->ivars != NULL) {
			int i;

			for (i = 0; i < class->ivars->ivar_count; i++)
				[instanceVariables addObject:
				    [[[OFInstanceVariable alloc]
				    _initWithIvar: class->ivars->ivar_list + i]
				    autorelease]];
		}
#endif

		[classMethods makeImmutable];
		[instanceMethods makeImmutable];
		[instanceVariables makeImmutable];

		[pool release];