This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch hotfix/fixes_typo_in_hashmap_callback
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 627ae33e51340e9bf0291e14a1be221aeec4a8e9
Author: Pepijn Noltes <[email protected]>
AuthorDate: Tue Sep 6 16:55:37 2022 +0200

    Fix typo in the celix_long_hash_map_create_options
---
 libs/utils/gtest/src/HashMapTestSuite.cc | 2 +-
 libs/utils/include/celix_long_hash_map.h | 8 ++++----
 libs/utils/src/celix_hash_map.c          | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libs/utils/gtest/src/HashMapTestSuite.cc 
b/libs/utils/gtest/src/HashMapTestSuite.cc
index 1f760a9a..fa0e7f62 100644
--- a/libs/utils/gtest/src/HashMapTestSuite.cc
+++ b/libs/utils/gtest/src/HashMapTestSuite.cc
@@ -202,7 +202,7 @@ TEST_F(HashMapTestSuite, 
DestroyHashMapWithSimpleRemovedCallback) {
     celix_stringHashMap_destroy(sMap);
 
     celix_long_hash_map_create_options_t lOpts{};
-    lOpts.simpledRemoveCallback = free;
+    lOpts.simpleRemovedCallback = free;
     auto* lMap = celix_longHashMap_createWithOptions(&lOpts);
     EXPECT_TRUE(lMap != nullptr);
     EXPECT_EQ(0, celix_longHashMap_size(lMap));
diff --git a/libs/utils/include/celix_long_hash_map.h 
b/libs/utils/include/celix_long_hash_map.h
index c7d25056..3ff1e906 100644
--- a/libs/utils/include/celix_long_hash_map.h
+++ b/libs/utils/include/celix_long_hash_map.h
@@ -66,11 +66,11 @@ typedef struct celix_long_hash_map_create_options {
      * from the hash map. The removed value is provided as pointer.
      *
      * @note only simpleRemovedCallback or removedCallback should be 
configured, if both are configured,
-     * only the simpledRemoveCallback will be used.
+     * only the simpleRemovedCallback will be used.
      *
      * Default is NULL.
      */
-    void (*simpledRemoveCallback)(void* value) CELIX_OPTS_INIT;
+    void (*simpleRemovedCallback)(void* value) CELIX_OPTS_INIT;
 
     /**
      * Optional callback data, which will be provided to the removeCallback 
callback.
@@ -86,7 +86,7 @@ typedef struct celix_long_hash_map_create_options {
      * The callback data pointer will be provided as first argument to the 
destroy callback.
      *
      * @note only simpleRemovedCallback or removedCallback should be 
configured, if both are configured,
-     * only the simpledRemoveCallback will be used.
+     * only the simpleRemovedCallback will be used.
      *
      * Default is NULL.
      */
@@ -125,7 +125,7 @@ typedef struct celix_long_hash_map_create_options {
  * @brief C Macro to create a empty string_hash_map_create_options_t type.
  */
 #define CELIX_EMPTY_LONG_HASH_MAP_CREATE_OPTIONS {      \
-    .simpledRemoveCallback = NULL,                      \
+    .simpleRemovedCallback = NULL,                      \
     .removedCallbackData = NULL,                        \
     .removedCallback = NULL,                            \
     .initialCapacity = 0,                               \
diff --git a/libs/utils/src/celix_hash_map.c b/libs/utils/src/celix_hash_map.c
index 62fe1199..1ef9b75e 100644
--- a/libs/utils/src/celix_hash_map.c
+++ b/libs/utils/src/celix_hash_map.c
@@ -437,7 +437,7 @@ celix_long_hash_map_t* 
celix_longHashMap_createWithOptions(const celix_long_hash
     unsigned int cap = opts->initialCapacity > 0 ? opts->initialCapacity : 
DEFAULT_INITIAL_CAPACITY;
     double fac = opts->loadFactor > 0 ? opts->loadFactor : DEFAULT_LOAD_FACTOR;
     celix_hashMap_init(&map->genericMap, CELIX_HASH_MAP_LONG_KEY, cap, fac, 
celix_longHashMap_hash, celix_longHashMap_equals);
-    map->genericMap.simpleRemovedCallback = opts->simpledRemoveCallback;
+    map->genericMap.simpleRemovedCallback = opts->simpleRemovedCallback;
     map->genericMap.removedCallbackData = opts->removedCallbackData;
     map->genericMap.removedLongKeyCallback = opts->removedCallback;
     map->genericMap.storeKeysWeakly = false;

Reply via email to