Skip to content

Commit

Permalink
Merge pull request #63 from eileencodes/fix-undeclared-function-rb_mm…
Browse files Browse the repository at this point in the history
…tk_enabled_p

Fix undeclared function `rb_mmtk_enabled_p` when compiling
  • Loading branch information
wks authored Apr 11, 2024
2 parents f014f8b + 7556cec commit 5f5aa4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion error.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const voi
const char *file = NULL;
int line = 0;

#ifdef USE_MMTK
#if USE_MMTK
// When using MMTk, this function may be called from GC worker threads,
// in which case there will not be a Ruby execution context.
if (rb_current_execution_context(!rb_mmtk_enabled_p())) {
Expand Down
2 changes: 1 addition & 1 deletion gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -10070,7 +10070,7 @@ rb_gc_prepare_heap(void)
static int
gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
{
#ifdef USE_MMTK
#if USE_MMTK
if (rb_mmtk_enabled_p()) {
rb_bug("Function %s should not be called when MMTk is enabled.", RUBY_FUNCTION_NAME_STRING);
}
Expand Down

0 comments on commit 5f5aa4f

Please sign in to comment.