void BlobSortEx_Feed_IMP(BlobSortEx *self, Obj *item) { BlobSortExIVARS *const ivars = BlobSortEx_IVARS(self); BlobSortEx_Feed_t super_feed = SUPER_METHOD_PTR(BLOBSORTEX, LUCY_BlobSortEx_Feed); super_feed(self, item); // Flush() if necessary. Blob *blob = (Blob*)CERTIFY(item, BLOB); ivars->mem_consumed += Blob_Get_Size(blob); if (ivars->mem_consumed >= ivars->mem_thresh) { BlobSortEx_Flush(self); } }
void BBSortEx_Feed_IMP(BBSortEx *self, Obj *item) { BBSortExIVARS *const ivars = BBSortEx_IVARS(self); BBSortEx_Feed_t super_feed = SUPER_METHOD_PTR(BBSORTEX, LUCY_BBSortEx_Feed); super_feed(self, item); // Flush() if necessary. ByteBuf *bytebuf = (ByteBuf*)CERTIFY(item, BYTEBUF); ivars->mem_consumed += BB_Get_Size(bytebuf); if (ivars->mem_consumed >= ivars->mem_thresh) { BBSortEx_Flush(self); } }