ObjFW  Diff

Differences From Artifact [ee707a5900]:

To Artifact [603616dc3f]:


89
90
91
92
93
94
95






96
97
98
99
100






101








102







103
104






105
106
 * Removes the last items from the OFArray
 *
 * \param nitems The number of items to remove
 */
- removeNItems: (size_t)nitems;
@end







@interface OFBigArray: OFArray
{
	size_t size;
}







+ newWithItemSize: (size_t)is;








- initWithItemSize: (size_t)is;







- addNItems: (size_t)nitems
 fromCArray: (void*)carray;






- removeNItems: (size_t)nitems;
@end







>
>
>
>
>
>





>
>
>
>
>
>

>
>
>
>
>
>
>
>

>
>
>
>
>
>
>


>
>
>
>
>
>


89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
 * Removes the last items from the OFArray
 *
 * \param nitems The number of items to remove
 */
- removeNItems: (size_t)nitems;
@end

/**
 * The OFBigArray class is nearly the same as the OFArray class, but it
 * allocates the memory rather in pages than in bytes.
 * This is faster, but needs more memory. It is especially useful if you want
 * to store large hunks of data.
 */
@interface OFBigArray: OFArray
{
	size_t size;
}

/**
 * Creates a new OFBigArray whose items all have the same size.
 *
 * \param is The size of each element in the OFBigArray
 * \return A new allocated and initialized OFBigArray
 */
+ newWithItemSize: (size_t)is;

/**
 * Initializes an already allocated OFBigArray whose items all have the same
 * size.
 * 
 * \param is The size of each element in the OFBigArray
 * \return An initialized OFBigArray
 */
- initWithItemSize: (size_t)is;

/**
 * Adds items from a C array to the OFBigArray
 *
 * \param nitems The number of items to add
 * \param carray A C array containing the items to add
 */
- addNItems: (size_t)nitems
 fromCArray: (void*)carray;

/**
 * Removes the last items from the OFBigArray
 *
 * \param nitems The number of items to remove
 */
- removeNItems: (size_t)nitems;
@end