summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2018-02-16 21:05:21 +0300
committerIvan Maidanski <ivmai@mail.ru>2018-02-16 21:05:21 +0300
commita825a2d612e749c08c24fca0f11eb2a523ce3b6b (patch)
tree55ba2113473a73bd83f96269747a1c0622e8f4ff /mark_rts.c
parentc59a2ecc4588c76c986850363aa59252a96b0d67 (diff)
downloadbdwgc-a825a2d612e749c08c24fca0f11eb2a523ce3b6b.tar.gz
Convert GC source files to valid C++ code
Issue #206 (bdwgc). * alloc.c (GC_copyright): Change type from char* const to const char* const. * alloc.c (GC_set_fl_marks, GC_clear_fl_marks, GC_finish_collection, GC_allocobj): Add missing explicit casts from void* to ptr_t. * backgraph.c [MAKE_BACK_GRAPH] (add_back_edges): Likewise. * blacklst.c (GC_default_print_heap_obj_proc, GC_print_blacklisted_ptr): Likewise. * dbg_mlc.c (GC_get_back_ptr_info, GC_store_debug_info_inner, GC_store_debug_info, GC_debug_malloc, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_generic_malloc, GC_debug_malloc_stubborn, GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, GC_debug_malloc_atomic_uncollectable, GC_debug_free, GC_debug_free_inner, GC_debug_register_finalizer, GC_debug_register_finalizer_no_order, GC_debug_register_finalizer_unreachable, GC_debug_register_finalizer_ignore_self): Likewise. * finalize.c (GC_grow_table, push_and_mark_object, ensure_toggleref_capacity, GC_dump_finalization_links, GC_dump_finalization, GC_make_disappearing_links_disappear, GC_remove_dangling_disappearing_links, GC_finalize): Likewise. * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise. * mallocx.c (GC_memalign): Likewise. * mark.c (GC_mark_from, GC_mark_and_push, GC_push_all_eager, GC_push_all_stack, GC_push_marked1, GC_push_marked2, GC_push_marked4): Likewise. * mark_rts.c (GC_exclude_static_roots_inner): Likewise. * misc.c (GC_base): Likewise. * new_hblk.c (GC_new_hblk): Likewise. * pthread_support.c (GC_register_altstack, GC_thr_init, GC_record_stack_base): Likewise. * ptr_chck.c (GC_is_visible): Likewise. * reclaim.c (GC_reclaim_small_nonempty_block, GC_disclaim_and_reclaim_or_free_small_block): Likewise. * thread_local_alloc.c (GC_mark_thread_local_fls_for): Likewise. * typd_mlc.c (GC_typed_mark_proc, GC_malloc_explicitly_typed_ignore_off_page): Likewise. * win32_threads.c (GC_record_stack_base, GC_get_stack_min, GC_push_stack_for): Likewise. * blacklst.c (GC_copy_bl): Rename "new" argument to "dest". * dbg_mlc.c (GC_store_debug_info_inner, GC_print_smashed_obj): Change type of p argument from ptr_t to void*. * include/private/gc_priv.h (GC_is_heap_base, GC_is_static_root): Likewise. * mark_rts.c [!THREADS] (GC_is_static_root): Likewise. * os_dep.c (GC_is_malloc_heap_base, GC_is_heap_base): Likewise. * ptr_chck.c (GC_on_stack): Likewise. * dbg_mlc.c (GC_print_obj): Change type of kind_str local variable from char* to const char*. * dbg_mlc.c (GC_debug_strdup, GC_debug_strndup): Cast result of GC_debug_malloc_atomic() to char*. * mallocx.c (GC_strdup, GC_strndup): Likewise. * dbg_mlc.c (GC_debug_wcsdup): Cast result of GC_debug_malloc_atomic() to wchar_t*. * mallocx.c (GC_wcsdup): Likewise. * dyn_load.c [MSWIN32 || MSWINCE || CYGWIN32] (GC_register_dynamic_libraries): Cast p local variable to char*. * os_dep.c (GC_register_data_segments): Likewise. * fnlz_mlc.c [ENABLE_DISCLAIM] (GC_finalized_disclaim): Cast masked fc_word to struct GC_finalizer_closure* (instead of void*). * fnlz_mlc.c [ENABLE_DISCLAIM] (GC_finalized_malloc): Cast result of GC_malloc_kind() to word*. * typd_mlc.c (GC_malloc_explicitly_typed, GC_calloc_explicitly_typed): Likewise. * include/private/gc_priv.h (WARN): Cast away const qualifier for msg (and the string literal). * misc.c (GC_default_on_abort): Remove cast to void* for WRITE() buf argument. * misc.c (GC_new_free_list_inner): Cast result local variable to void**. * misc.c (GC_new_free_list): Change type of result local variable from void* to void**. * pthread_support.c (GC_start_rtn_prepare_thread): Cast arg to struct start_info*. * win32_threads.c [GC_PTHREADS] (GC_pthread_start_inner): Likewise. * reclaim.c (GC_print_free_list): Replace ptr_t flh to void *flh_next local variable; remove redundant casts. * tools/if_mach.c (EXECV_ARGV_T): New macro; add comment. * tools/if_not_there.c (EXECV_ARGV_T): Likewise. * tools/if_mach.c (main): Use EXECV_ARGV_T instead of void* for execvp() argument. * tools/if_not_there.c (main): Likewise. * typd_mlc.c (LeafDescriptor, ComplexArrayDescriptor, SequenceDescriptor): Move struct definition out of union ComplexDescriptor. * typd_mlc.c (GC_add_ext_descriptor): Rename "new" local variable to newExtD. * win32_threads.c (GC_CreateThread, GC_beginthreadex): Cast result of GC_malloc_uncollectable() to thread_args*. * win32_threads.c [PARALLEL_MARK && !MSWINCE && __cplusplus] (GC_thr_init): Do not cast GetProcessAffinityMask() arguments to void*.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mark_rts.c b/mark_rts.c
index c688feb3..fe25931a 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -77,7 +77,7 @@ static int n_root_sets = 0;
#ifndef THREADS
/* Primarily for debugging support: */
/* Is the address p in one of the registered static root sections? */
- GC_INNER GC_bool GC_is_static_root(ptr_t p)
+ GC_INNER GC_bool GC_is_static_root(void *p)
{
static int last_root_set = MAX_ROOT_SETS;
int i;
@@ -454,7 +454,7 @@ GC_INNER void GC_exclude_static_roots_inner(void *start, void *finish)
if (0 == GC_excl_table_entries) {
next = 0;
} else {
- next = GC_next_exclusion(start);
+ next = GC_next_exclusion((ptr_t)start);
}
if (0 != next) {
size_t i;