ObjFW  Check-in [793bd8883b]

Overview
Comment:Blocks: Only use the lower 2 bytes as retain count
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.7
Files: files | file ages | folders
SHA3-256: 793bd8883b340cd197ec985d0e85dcc6c8a15c0f2fbd7291366104fb284eaa95
User & Date: js on 2012-11-03 22:19:45
Other Links: branch diff | manifest | tags
Context
2012-11-03
22:20
Small workaround for a Haiku bug. check-in: 9667b3fd54 user: js tags: 0.7
22:19
Blocks: Only use the lower 2 bytes as retain count check-in: 793bd8883b user: js tags: 0.7
2012-11-02
22:08
Make -[removeLastObject] on an empty array a nop. check-in: ddbf831e72 user: js tags: 0.7
Changes

Modified src/OFBlock.m from [6ab3d02d2d] to [79c29da2a3].

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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,







|
<
<







53
54
55
56
57
58
59
60


61
62
63
64
65
66
67
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 0xFFFF



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,