From 07e132e3adc898d0d3de46fa95e355ce9baf8468 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 23 Aug 2012 10:46:29 -0400 Subject: [PATCH] Rename event_enable_lock_debuging() to ..._debugging() Keep the misspelled version around for backward compatibility Based on a patch by Diwaker Gupta. --- evthread.c | 7 +++++++ include/event2/thread.h | 4 ++++ test/regress_main.c | 2 +- test/test-ratelim.c | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/evthread.c b/evthread.c index b5d3d577e3..4da5d24e80 100644 --- a/evthread.c +++ b/evthread.c @@ -275,8 +275,15 @@ debug_cond_wait(void *cond_, void *lock_, const struct timeval *tv) return r; } +/* misspelled version for backward compatibility */ void evthread_enable_lock_debuging(void) +{ + evthread_enable_lock_debugging(); +} + +void +evthread_enable_lock_debugging(void) { struct evthread_lock_callbacks cbs = { EVTHREAD_LOCK_API_VERSION, diff --git a/include/event2/thread.h b/include/event2/thread.h index cf21afe259..f9f51500b6 100644 --- a/include/event2/thread.h +++ b/include/event2/thread.h @@ -217,6 +217,10 @@ int evthread_use_pthreads(void); * If you're going to call this function, you must do so before any locks are * allocated. **/ +void evthread_enable_lock_debugging(void); + +/* Old (misspelled) version: This is deprecated; use + * evthread_enable_log_debugging instead. */ void evthread_enable_lock_debuging(void); #endif /* EVENT__DISABLE_THREAD_SUPPORT */ diff --git a/test/regress_main.c b/test/regress_main.c index 26e539ebd4..ed90f81722 100644 --- a/test/regress_main.c +++ b/test/regress_main.c @@ -436,7 +436,7 @@ main(int argc, const char **argv) #ifndef EVENT__DISABLE_THREAD_SUPPORT if (!getenv("EVENT_NO_DEBUG_LOCKS")) - evthread_enable_lock_debuging(); + evthread_enable_lock_debugging(); #endif tinytest_set_aliases(testaliases); diff --git a/test/test-ratelim.c b/test/test-ratelim.c index 0d8278aadf..b53ffe6637 100644 --- a/test/test-ratelim.c +++ b/test/test-ratelim.c @@ -594,7 +594,7 @@ main(int argc, char **argv) } #ifndef EVENT__DISABLE_THREAD_SUPPORT - evthread_enable_lock_debuging(); + evthread_enable_lock_debugging(); #endif return test_ratelimiting();