* xmlListRemoveLast: * @l: a list * @data: list data * * Remove the last instance associated to data in the list * * Returns 1 if a deallocation occurred, or 0 if not found */
| 364 | * Returns 1 if a deallocation occurred, or 0 if not found |
| 365 | */ |
| 366 | int |
| 367 | xmlListRemoveLast(xmlListPtr l, void *data) |
| 368 | { |
| 369 | xmlLinkPtr lk; |
| 370 | |
| 371 | if (l == NULL) |
| 372 | return(0); |
| 373 | /*Find the last instance of this data */ |
| 374 | lk = xmlListLinkReverseSearch(l, data); |
| 375 | if (lk != NULL) { |
| 376 | xmlLinkDeallocator(l, lk); |
| 377 | return 1; |
| 378 | } |
| 379 | return 0; |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * xmlListRemoveAll: |
nothing calls this directly
no test coverage detected