| 202 * @param func (@c cx_compare_func2) the compare function |
202 * @param func (@c cx_compare_func2) the compare function |
| 203 * @param data (@c void*) the pointer to custom data that is passed to the compare function |
203 * @param data (@c void*) the pointer to custom data that is passed to the compare function |
| 204 */ |
204 */ |
| 205 #define cxSetAdvancedCompareFunc(c, func, data) \ |
205 #define cxSetAdvancedCompareFunc(c, func, data) \ |
| 206 (c)->collection.advanced_cmp = (cx_compare_func2) func; \ |
206 (c)->collection.advanced_cmp = (cx_compare_func2) func; \ |
| 207 (c)->collection.destructor_data = data |
207 (c)->collection.cmp_data = data |
| 208 |
208 |
| 209 /** |
209 /** |
| 210 * Invokes the simple comparator function for two elements. |
210 * Invokes the simple comparator function for two elements. |
| 211 * |
211 * |
| 212 * Usually only used by collection implementations. There should be no need |
212 * Usually only used by collection implementations. There should be no need |