From 5de74028f890ee9e681772448c502a86999243ff Mon Sep 17 00:00:00 2001 From: darin Date: Tue, 26 Apr 2005 21:20:28 +0000 Subject: [PATCH] - fixed development builds * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9053 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog-2005-08-23 | 6 ++++++ WebCore/khtml/misc/main_thread_malloc.h | 16 +++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23 index 8819fa9e583d..86d88cfefe59 100644 --- a/WebCore/ChangeLog-2005-08-23 +++ b/WebCore/ChangeLog-2005-08-23 @@ -1,3 +1,9 @@ +2005-04-26 Darin Adler + + - fixed development builds + + * khtml/misc/main_thread_malloc.h: Use inlines instead of macros for allocation functions. + 2005-04-25 David Hyatt Fix for 4097842, changing 1st line of a url that wraps doesn't update the second line. Make sure to diff --git a/WebCore/khtml/misc/main_thread_malloc.h b/WebCore/khtml/misc/main_thread_malloc.h index 97a50bad439c..81bedb6a3f59 100644 --- a/WebCore/khtml/misc/main_thread_malloc.h +++ b/WebCore/khtml/misc/main_thread_malloc.h @@ -20,7 +20,6 @@ * */ - #ifndef KHTMLMAINTTHREADMALLOC_H #define KHTMLMAINTTHREADMALLOC_H @@ -30,31 +29,30 @@ // while holding the collector lock (this is true whenenever the interpreter is // executing or GC is taking place). +namespace khtml { #ifndef NDEBUG -#define main_thread_malloc malloc -#define main_thread_calloc calloc -#define main_thread_free free -#define main_thread_realloc realloc +inline void *main_thread_malloc(size_t n) { return malloc(n); } +inline void *main_thread_calloc(size_t n_elements, size_t element_size) { return calloc(n_elements, element_size); } +inline void main_thread_free(void* p) { free(p); } +inline void *main_thread_realloc(void* p, size_t n) { return realloc(p, n); } #define MAIN_THREAD_ALLOCATED #else -namespace khtml { - void *main_thread_malloc(size_t n); void *main_thread_calloc(size_t n_elements, size_t element_size); void main_thread_free(void* p); void *main_thread_realloc(void* p, size_t n); -}; - #define MAIN_THREAD_ALLOCATED \ void* operator new(size_t s) { return khtml::main_thread_malloc(s); } \ void operator delete(void* p) { khtml::main_thread_free(p); } #endif +}; + #endif /* KHTMLMAINTTHREADMALLOC_H */ -- 2.36.0