ObjFW  Diff

Differences From Artifact [2b8f65eef1]:

To Artifact [3575f5766b]:


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
- OF_initWithMethod: (struct objc_method*)method
{
	self = [super init];

	@try {
		selector = (SEL)&method->sel;
		name = [[OFString alloc]
		    initWithCString: sel_getName(selector)
			   encoding: OF_STRING_ENCODING_ASCII];
		typeEncoding = method->sel.types;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
#elif defined(OF_APPLE_RUNTIME)
- OF_initWithMethod: (Method)method
{
	self = [super init];

	@try {
		selector = method_getName(method);
		name = [[OFString alloc]
		    initWithCString: sel_getName(selector)
			   encoding: OF_STRING_ENCODING_ASCII];
		typeEncoding = method_getTypeEncoding(method);
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;







|
<
















|
<







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
- OF_initWithMethod: (struct objc_method*)method
{
	self = [super init];

	@try {
		selector = (SEL)&method->sel;
		name = [[OFString alloc]
		    initWithUTF8String: sel_getName(selector)];

		typeEncoding = method->sel.types;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
#elif defined(OF_APPLE_RUNTIME)
- OF_initWithMethod: (Method)method
{
	self = [super init];

	@try {
		selector = method_getName(method);
		name = [[OFString alloc]
		    initWithUTF8String: sel_getName(selector)];

		typeEncoding = method_getTypeEncoding(method);
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
@implementation OFInstanceVariable
#if defined(OF_OBJFW_RUNTIME)
- OF_initWithIvar: (struct objc_ivar*)ivar
{
	self = [super init];

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

	return self;
}
#elif defined(OF_APPLE_RUNTIME)
- OF_initWithIvar: (Ivar)ivar
{
	self = [super init];

	@try {
		name = [[OFString alloc]
		    initWithCString: ivar_getName(ivar)
			   encoding: OF_STRING_ENCODING_ASCII];
		typeEncoding = ivar_getTypeEncoding(ivar);
		offset = ivar_getOffset(ivar);
	} @catch (id e) {
		[self release];
		@throw e;
	}








|
<
<
















|
<







144
145
146
147
148
149
150
151


152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

169
170
171
172
173
174
175
@implementation OFInstanceVariable
#if defined(OF_OBJFW_RUNTIME)
- OF_initWithIvar: (struct objc_ivar*)ivar
{
	self = [super init];

	@try {
		name = [[OFString alloc] initWithUTF8String: ivar->name];


		typeEncoding = ivar->type;
		offset = ivar->offset;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
#elif defined(OF_APPLE_RUNTIME)
- OF_initWithIvar: (Ivar)ivar
{
	self = [super init];

	@try {
		name = [[OFString alloc]
		    initWithUTF8String: ivar_getName(ivar)];

		typeEncoding = ivar_getTypeEncoding(ivar);
		offset = ivar_getOffset(ivar);
	} @catch (id e) {
		[self release];
		@throw e;
	}