ObjFW  Diff

Differences From Artifact [995214f475]:

  • File src/OFBlock.m — part of check-in [f78e4e4714] at 2010-10-05 20:01:08 on branch trunk — Remove -[autorelease] from OFBlock.

    The reason is that a block might be an NSBlock on OS X where it would
    add the block to an NSAutoreleasePool. This change forces the developer
    to use [OFAutoreleasePool addObject: block], which will also work if
    the block is an NSBlock. Thus, this change is to force developers to
    write portable code. (user: js, size: 5408) [annotate] [blame] [check-ins using]

To Artifact [ec9c649489]:


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#import "OFBlock.h"
#import "OFAutoreleasePool.h"

#if defined(OF_GNU_RUNTIME) || defined(OF_OBJFW_RUNTIME)
struct objc_abi_class {
	struct objc_abi_metaclass *metaclass;
	const char *superclass, *name;
	unsigned long version, info, instance_size;
	void *ivars, *methodlist, *dtable, *subclass_list, *sibling_class;







<







12
13
14
15
16
17
18

19
20
21
22
23
24
25
#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#import "OFBlock.h"


#if defined(OF_GNU_RUNTIME) || defined(OF_OBJFW_RUNTIME)
struct objc_abi_class {
	struct objc_abi_metaclass *metaclass;
	const char *superclass, *name;
	unsigned long version, info, instance_size;
	void *ivars, *methodlist, *dtable, *subclass_list, *sibling_class;