ObjFW  Check-in [38bde7146a]

Overview
Comment:Ensure OF{Stack,Global,Malloc}Block get initialized.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 38bde7146a197935b07daea6afe421047cd1a362846ca706bd9a23400db56443
User & Date: js on 2010-11-12 19:36:09
Other Links: manifest | tags
Context
2010-11-12
20:13
Add tests for blocks. check-in: d7c2d46b2b user: js tags: trunk
19:36
Ensure OF{Stack,Global,Malloc}Block get initialized. check-in: 38bde7146a user: js tags: trunk
16:00
Always use our _Block_copy. check-in: 4285aea3c6 user: js tags: trunk
Changes

Modified src/OFBlock.m from [86829d5175] to [f036063ec4].

374
375
376
377
378
379
380








381
382
383








384
385
386








387
388
389
					      selector: _cmd];
	[super dealloc];	/* Get rid of a stupid warning */
}
@end

#if defined(OF_APPLE_RUNTIME) && defined(__OBJC2__)
@implementation OFStackBlock








@end

@implementation OFGlobalBlock








@end

@implementation OFMallocBlock








@end
#endif
/// \endcond







>
>
>
>
>
>
>
>



>
>
>
>
>
>
>
>



>
>
>
>
>
>
>
>



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
					      selector: _cmd];
	[super dealloc];	/* Get rid of a stupid warning */
}
@end

#if defined(OF_APPLE_RUNTIME) && defined(__OBJC2__)
@implementation OFStackBlock
+ (void)load
{
	/*
	 * Send a message to the class to ensure it's initialized. Otherwise it
	 * it might not get initialized as blocks are preallocated.
	 */
	[self class];
}
@end

@implementation OFGlobalBlock
+ (void)load
{
	/*
	 * Send a message to the class to ensure it's initialized. Otherwise it
	 * it might not get initialized as blocks are preallocated.
	 */
	[self class];
}
@end

@implementation OFMallocBlock
+ (void)load
{
	/*
	 * Send a message to the class to ensure it's initialized. Otherwise it
	 * it might not get initialized as blocks are preallocated.
	 */
	[self class];
}
@end
#endif
/// \endcond