ObjFW  Diff

Differences From Artifact [a9d438e321]:

To Artifact [beb53a5545]:


33
34
35
36
37
38
39

40
41
42
43
44
45
46
{
	char   *data;
	size_t count;
	size_t itemSize;
}

#ifdef OF_HAVE_PROPERTIES

@property (readonly) size_t count;
@property (readonly) size_t itemSize;
#endif

/**
 * \brief Creates a new OFDataArray with an item size of 1.
 *







>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
	char   *data;
	size_t count;
	size_t itemSize;
}

#ifdef OF_HAVE_PROPERTIES
@property (readonly, getter=cArray) void *data;
@property (readonly) size_t count;
@property (readonly) size_t itemSize;
#endif

/**
 * \brief Creates a new OFDataArray with an item size of 1.
 *
138
139
140
141
142
143
144


145
146
147
148
149
150
151
 *
 * \return The size of each item in the OFDataArray in bytes
 */
- (size_t)itemSize;

/**
 * \brief Returns all elements of the OFDataArray as a C array.


 *
 * Modifying the returned array directly is allowed and will change the contents
 * of the data array.
 *
 * \return All elements of the OFDataArray as a C array
 */
- (void*)cArray;







>
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
 *
 * \return The size of each item in the OFDataArray in bytes
 */
- (size_t)itemSize;

/**
 * \brief Returns all elements of the OFDataArray as a C array.
 *
 * WARNING: The pointer is only valid until the OFDataArray is changed!
 *
 * Modifying the returned array directly is allowed and will change the contents
 * of the data array.
 *
 * \return All elements of the OFDataArray as a C array
 */
- (void*)cArray;