Delete the specified item ID from the stream, returning 1 if the item * was deleted 0 otherwise (if it does not exist). */
| 1320 | /* Delete the specified item ID from the stream, returning 1 if the item |
| 1321 | * was deleted 0 otherwise (if it does not exist). */ |
| 1322 | int streamDeleteItem(stream *s, streamID *id) { |
| 1323 | int deleted = 0; |
| 1324 | streamIterator si; |
| 1325 | streamIteratorStart(&si,s,id,id,0); |
| 1326 | streamID myid; |
| 1327 | int64_t numfields; |
| 1328 | if (streamIteratorGetID(&si,&myid,&numfields)) { |
| 1329 | streamIteratorRemoveEntry(&si,&myid); |
| 1330 | deleted = 1; |
| 1331 | } |
| 1332 | streamIteratorStop(&si); |
| 1333 | return deleted; |
| 1334 | } |
| 1335 | |
| 1336 | /* Get the last valid (non-tombstone) streamID of 's'. */ |
| 1337 | void streamLastValidID(stream *s, streamID *maxid) |
no test coverage detected