src/cx/list.h

changeset 618
1f5a8f6f3015
parent 528
4fbfac557df8
child 621
646e38efc7bc
equal deleted inserted replaced
617:cec11387c1be 618:1f5a8f6f3015
389 } 389 }
390 390
391 /** 391 /**
392 * Compares a list to another list of the same type. 392 * Compares a list to another list of the same type.
393 * 393 *
394 * First, the list sizes are compared. If they match, the lists are compared element-wise. 394 * First, the list sizes are compared.
395 * If they match, the lists are compared element-wise.
395 * 396 *
396 * @param list the list 397 * @param list the list
397 * @param other the list to compare to 398 * @param other the list to compare to
398 * @return zero, if both lists are equal element wise, negative if the first list is smaller, zero if the first list is larger 399 * @return zero, if both lists are equal element wise,
399 */ 400 * negative if the first list is smaller, positive if the first list is larger
400 __attribute__((__nonnull__)) 401 */
401 static inline int cxListCompare( 402 __attribute__((__nonnull__))
402 CxList *list, 403 int cxListCompare(
403 CxList *other 404 CxList const *list,
404 ) { 405 CxList const *other
405 return list->cl->compare(list, other); 406 );
406 }
407 407
408 /** 408 /**
409 * Deallocates the memory of the specified list structure. 409 * Deallocates the memory of the specified list structure.
410 * 410 *
411 * Also calls content a destructor function, depending on the configuration 411 * Also calls content a destructor function, depending on the configuration

mercurial