Mercurial > hg > xemacs-beta
changeset 5042:f395ee7ad844
Fix some compile warnings, make vdb test code conditional on DEBUG_XEMACS
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2010-02-15 Ben Wing <ben@xemacs.org>
* mc-alloc.c:
* mc-alloc.c (mc_realloc_1):
* mc-alloc.c (set_dirty_bit):
* mc-alloc.c (set_dirty_bit_for_address):
* mc-alloc.c (get_dirty_bit):
* mc-alloc.c (get_dirty_bit_for_address):
* mc-alloc.c (set_protection_bit):
* mc-alloc.c (set_protection_bit_for_address):
* mc-alloc.c (get_protection_bit):
* mc-alloc.c (get_protection_bit_for_address):
* mc-alloc.c (get_page_start):
* vdb-win32.c (win32_fault_handler):
* vdb.c:
Fix some compile warnings, make vdb test code conditional on
DEBUG_XEMACS.
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 15 Feb 2010 21:52:39 -0600 |
parents | efaa6cd845e5 |
children | d0c14ea98592 |
files | src/ChangeLog src/mc-alloc.c src/vdb-win32.c src/vdb.c |
diffstat | 4 files changed, 37 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon Feb 15 21:51:22 2010 -0600 +++ b/src/ChangeLog Mon Feb 15 21:52:39 2010 -0600 @@ -1,3 +1,21 @@ +2010-02-15 Ben Wing <ben@xemacs.org> + + * mc-alloc.c: + * mc-alloc.c (mc_realloc_1): + * mc-alloc.c (set_dirty_bit): + * mc-alloc.c (set_dirty_bit_for_address): + * mc-alloc.c (get_dirty_bit): + * mc-alloc.c (get_dirty_bit_for_address): + * mc-alloc.c (set_protection_bit): + * mc-alloc.c (set_protection_bit_for_address): + * mc-alloc.c (get_protection_bit): + * mc-alloc.c (get_protection_bit_for_address): + * mc-alloc.c (get_page_start): + * vdb-win32.c (win32_fault_handler): + * vdb.c: + Fix some compile warnings, make vdb test code conditional on + DEBUG_XEMACS. + 2010-02-15 Ben Wing <ben@xemacs.org> * regex.c:
--- a/src/mc-alloc.c Mon Feb 15 21:51:22 2010 -0600 +++ b/src/mc-alloc.c Mon Feb 15 21:52:39 2010 -0600 @@ -1,5 +1,6 @@ /* New size-based allocator for XEmacs. Copyright (C) 2005 Marcus Crestani. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -1578,7 +1579,7 @@ /* Changes the size of the cell pointed to by ptr. Returns the new address of the new cell with new size. */ -void * +static void * mc_realloc_1 (void *ptr, size_t size, int elemcount) { if (ptr) @@ -1782,25 +1783,25 @@ /*--- incremental garbage collector ----------------------------------*/ /* access dirty bit of page header */ -void +static void set_dirty_bit (page_header *ph, unsigned int value) { PH_DIRTY_BIT (ph) = value; } -void +static void set_dirty_bit_for_address (void *ptr, unsigned int value) { set_dirty_bit (get_page_header (ptr), value); } -unsigned int +static unsigned int get_dirty_bit (page_header *ph) { return PH_DIRTY_BIT (ph); } -unsigned int +static unsigned int get_dirty_bit_for_address (void *ptr) { return get_dirty_bit (get_page_header (ptr)); @@ -1808,25 +1809,25 @@ /* access protection bit of page header */ -void +static void set_protection_bit (page_header *ph, unsigned int value) { PH_PROTECTION_BIT (ph) = value; } -void +static void set_protection_bit_for_address (void *ptr, unsigned int value) { set_protection_bit (get_page_header (ptr), value); } -unsigned int +static unsigned int get_protection_bit (page_header *ph) { return PH_PROTECTION_BIT (ph); } -unsigned int +static unsigned int get_protection_bit_for_address (void *ptr) { return get_protection_bit (get_page_header (ptr)); @@ -1834,7 +1835,7 @@ /* Returns the start of the page of the object pointed to by ptr. */ -void * +static void * get_page_start (void *ptr) { return PH_HEAP_SPACE (get_page_header (ptr));
--- a/src/vdb-win32.c Mon Feb 15 21:51:22 2010 -0600 +++ b/src/vdb-win32.c Mon Feb 15 21:52:39 2010 -0600 @@ -29,7 +29,7 @@ #include "syswindows.h" -LONG WINAPI +static LONG WINAPI win32_fault_handler (LPEXCEPTION_POINTERS e) { #define GET_FAULT_ADDRESS (void *) e->ExceptionRecord->ExceptionInformation[1]
--- a/src/vdb.c Mon Feb 15 21:51:22 2010 -0600 +++ b/src/vdb.c Mon Feb 15 21:52:39 2010 -0600 @@ -1,5 +1,6 @@ /* Virtual diry bit implementation (platform independent) for XEmacs. Copyright (C) 2005 Marcus Crestani. + Copyright (C) 2010 Ben Wing. This file is part of XEmacs. @@ -74,6 +75,8 @@ /* For testing and debugging... */ +#ifdef DEBUG_XEMACS + DEFUN ("test-vdb", Ftest_vdb, 0, 0, "", /* Test virtual dirty bit implementation. Prints results to stderr. */ @@ -148,9 +151,13 @@ return Qnil; } +#endif /* DEBUG_XEMACS */ + void syms_of_vdb (void) { +#ifdef DEBUG_XEMACS DEFSUBR (Ftest_vdb); DEFSUBR (Ftest_segfault); +#endif /* DEBUG_XEMACS */ }