diff options
| author | hiddenalpha.ch | 2026-08-30 22:46:50 +0200 |
|---|---|---|
| committer | hiddenalpha.ch | 2026-08-30 22:46:50 +0200 |
| commit | 0facf62acfcfa5535e0595c43d7ebe45bc6a6c70 (patch) | |
| tree | 45de625ed8076b931ca2f528c07beb0d15128003 /include | |
| parent | 1912aa30f1862997504e1eb0b0faa9153931283f (diff) | |
| download | Qntan-0facf62acfcfa5535e0595c43d7ebe45bc6a6c70.tar.gz Qntan-0facf62acfcfa5535e0595c43d7ebe45bc6a6c70.zip | |
Add `del()` and `delAny()` to `HshIdx`.
Diffstat (limited to 'include')
| -rw-r--r-- | include/qntan/Qntan.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 |
