From e67bd5c00b0a641561f06ec1d0760d2cf2f041ed Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Fri, 27 Feb 2026 15:37:13 -0800 Subject: [PATCH] Fix typos --- CMakeLists.txt | 2 +- include/refcount/refcount.h | 2 +- src/refcount.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 011bb04..a1c9c3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.11) set(REFCOUNT_USE_THREADS ON - CACHE BOOL "Weather or not RefCount should be thread aware.") + CACHE BOOL "Whether or not RefCount should be thread aware.") if(REFCOUNT_USE_THREADS) message("Building with thread support, setting CMAKE_C_STANDARD to 11.") diff --git a/include/refcount/refcount.h b/include/refcount/refcount.h index ae8b7d7..e4e3eb2 100644 --- a/include/refcount/refcount.h +++ b/include/refcount/refcount.h @@ -401,7 +401,7 @@ static inline void *refcount_ref_weakref(RefcountWeakref *wr) { * Same as #refcount_context_weakref_is_valid, but operates on the global * context. * @param wr The weak reference - * @return Weather the reference is still valid + * @return Whether the reference is still valid */ static inline bool refcount_weakref_is_valid(RefcountWeakref *wr) { return refcount_context_weakref_is_valid(refcount_default_context, wr); diff --git a/src/refcount.c b/src/refcount.c index 1bb233a..a2a01cf 100644 --- a/src/refcount.c +++ b/src/refcount.c @@ -149,7 +149,7 @@ static bool init_obj_weakref(const RefcountContext *ctx, void *obj) { /** * @struct DestructorEntry - * Hash table entry used to hold descructor callback information. + * Hash table entry used to hold destructor callback information. */ struct DestructorEntry { refcount_destructor_callback_t callback; //!< The callback itself. @@ -299,9 +299,9 @@ static bool call_object_destructors_foreach_callback(void *key, void *entry_raw, } /** - * Call descructors for an object. + * Call destructors for an object. * @param ctx The #RefcountContext - * @param obj The object to call descructors for + * @param obj The object to call destructors for */ static void call_object_destructors(const RefcountContext *ctx, void *obj) { ht_foreach(ENTRY->destructors, call_object_destructors_foreach_callback, @@ -549,7 +549,7 @@ static const HTTableFunctions ROOT_COUNTS_FNS = { struct ContextAndRootPtr { RefcountContext *ctx; //!< The context. RefcountList **root_ptr; //!< Double pointer to the root. - bool did_update; //!< Weather or not *root_ptr was changed. + bool did_update; //!< Whether or not *root_ptr was changed. }; /** @@ -758,7 +758,7 @@ void refcount_context_destroy_weakref(const RefcountContext *ctx, * Return weather the object referenced by a weak reference still exists. * @param ctx The #RefcountContext * @param wr The weak reference - * @return Weather the reference is still valid + * @return Whether the reference is still valid */ bool refcount_context_weakref_is_valid(const RefcountContext *ctx, RefcountWeakref *wr) {