From 0facf62acfcfa5535e0595c43d7ebe45bc6a6c70 Mon Sep 17 00:00:00 2001 From: hiddenalpha.ch Date: Sun, 30 Aug 2026 22:46:50 +0200 Subject: Add `del()` and `delAny()` to `HshIdx`. --- include/qntan/Qntan.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/qntan/Qntan.h') diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index 3d23892..cee1af1 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -865,6 +865,17 @@ struct Qntan_HshIdx { * possibility of `get()` to return SEVERAL items for certain other * indexes. no? */ + int (*del)( struct Qntan_HshIdx**, void*srch, void*ptrToDst, int idx ); + /* Returns 0 if nothing was removed (eg there's no matching object). + * Returns 1 if found object got moved to 'ptrToDst'. + * Returns negative values on error. + */ + int (*delAny)( struct Qntan_HshIdx**, void*ptrToDst ); + /* Returns 0 if nothing was removed (eg there are no elements). + * Returns 1 if any object got moved to 'ptrToDst'. It is UNSPECIFIED which + * elements gets removed. + * Returns negative values on error. + */ int (*swap)( struct Qntan_HshIdx**, void*elm, void*ptrToDst, int idx ); /* Returns 0 if 'elm' got copied into the hashtable. * Returns 1 is similar to 'Return 0'. BUT: a matching element did already -- cgit v1.3.1