diff options
Diffstat (limited to 'include/qntan')
| -rw-r--r-- | include/qntan/Qntan.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index d5e77a7..1dcb005 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -831,7 +831,7 @@ struct Qntan_HshIdx { size_t (*getCnt)( struct Qntan_HshIdx** ); /* Returns number of objects currently present in this collection. */ - int (*addIfNew)( struct Qntan_HshIdx**, void*elm ); + int (*addIfNew)( struct Qntan_HshIdx**, void*elm, int idx ); /* Returns 0 if 'elm' got copied into the hashtable. * Returns '-EEXIST' (yep, negated) if 'elm' already exists. Nothing got * copied anywhere. @@ -842,6 +842,12 @@ struct Qntan_HshIdx { * Returns 1 if found object got copied to 'ptrToDst'. The element itelf * will swill be present in the table. */ + 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 + * exist and this old element now got swapped into 'ptrToDst'. + * Returns negative values to indicate errors. + */ }; |
