ObjFW  Check-in [58c07e80e4]

Overview
Comment:Make isa public to allow for better class swizzling.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 58c07e80e46eb70d736d0b19c33292b1ec6de596e432475430d0d722530f86e3
User & Date: js on 2011-02-26 19:00:57
Other Links: manifest | tags
Context
2011-02-26
19:40
Use class swizzling as an optimization. check-in: 06f539766f user: js tags: trunk
19:00
Make isa public to allow for better class swizzling. check-in: 58c07e80e4 user: js tags: trunk
14:27
of_std{in,out,err} don't support seeking. check-in: 9160269d5f user: js tags: trunk
Changes

Modified src/OFObject.h from [89e99f7304] to [ba88035595].

57
58
59
60
61
62
63

64
65
66
67
68
69
70
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71







+







@class OFString;

/**
 * \brief The root class for all other classes inside ObjFW.
 */
@interface OFObject
{
@public
	/// The class of the object
	Class isa;
}

/**
 * This code is executed once when the class is loaded into the runtime.
 *

Modified src/OFStream.m from [df8ed55ecd] to [aec32d828d].

487
488
489
490
491
492
493
494

495
496
497
498
499
500
501
487
488
489
490
491
492
493

494
495
496
497
498
499
500
501







-
+







					if (cache != NULL &&
					    cacheLen <= ret_len)
						memcpy(ret_c, cache, cacheLen);
					else if (cache != NULL)
						memcpy(ret_c, cache, ret_len);
					if (i >= delim_len)
						memcpy(ret_c + cacheLen, tmp,
					    	    i + 1 - delim_len);
						    i + 1 - delim_len);

					@try {
						ret = [OFString
						    stringWithCString: ret_c
							     encoding: encoding
							       length: ret_len];
					} @finally {

Modified src/OFURL.m from [ef4737e3c3] to [27d2646f3d].

201
202
203
204
205
206
207
208
209

210
211
212
213
214
215
216
201
202
203
204
205
206
207


208
209
210
211
212
213
214
215







-
-
+








			path = [[OFString alloc] initWithCString: str_c];
		}
	} @catch (id e) {
		[self release];
		@throw e;
	} @finally {
		if (str_c2 != NULL)
			free(str_c2);
		free(str_c2);
	}

	return self;
}

- initWithString: (OFString*)str
   relativeToURL: (OFURL*)url
275
276
277
278
279
280
281
282
283

284
285
286
287
288
289
290
274
275
276
277
278
279
280


281
282
283
284
285
286
287
288







-
-
+








			[pool release];
		}
	} @catch (id e) {
		[self release];
		@throw e;
	} @finally {
		if (str_c2 != NULL)
			free(str_c2);
		free(str_c2);
	}

	return self;
}

- (void)dealloc
{