34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#ifdef OF_ATOMIC_OPS
# import "atomic.h"
#endif
#ifdef OF_THREADS
# import "threading.h"
#endif
@protocol RetainRelease
- retain;
- (void)release;
@end
#if defined(OF_OBJFW_RUNTIME) || defined(OF_GNU_RUNTIME) || \
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
34
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
69
70
71
72
73
74
75
76
|
#ifdef OF_ATOMIC_OPS
# import "atomic.h"
#endif
#ifdef OF_THREADS
# import "threading.h"
#endif
typedef struct of_block_byref_t of_block_byref_t;
struct of_block_byref_t {
Class isa;
of_block_byref_t *forwarding;
int flags;
int size;
void (*byref_keep)(void *dest, void *src);
void (*byref_dispose)(void*);
};
enum {
OF_BLOCK_HAS_COPY_DISPOSE = (1 << 25),
OF_BLOCK_HAS_CTOR = (1 << 26),
OF_BLOCK_IS_GLOBAL = (1 << 28),
OF_BLOCK_HAS_STRET = (1 << 29),
OF_BLOCK_HAS_SIGNATURE = (1 << 30),
};
#define OF_BLOCK_REFCOUNT_MASK \
~(OF_BLOCK_HAS_COPY_DISPOSE | OF_BLOCK_HAS_CTOR | OF_BLOCK_IS_GLOBAL | \
OF_BLOCK_HAS_STRET | OF_BLOCK_HAS_SIGNATURE)
enum {
OF_BLOCK_FIELD_IS_OBJECT = 3,
OF_BLOCK_FIELD_IS_BLOCK = 7,
OF_BLOCK_FIELD_IS_BYREF = 8,
OF_BLOCK_FIELD_IS_WEAK = 16,
OF_BLOCK_BYREF_CALLER = 128,
};
@protocol RetainRelease
- retain;
- (void)release;
@end
#if defined(OF_OBJFW_RUNTIME) || defined(OF_GNU_RUNTIME) || \
|