From 7ef8c470d211af63b0898340074db373d55bc225 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 30 Nov 2025 17:40:41 +0900 Subject: Enable check for core data types by `RUBY_DEBUG` --- vm_core.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vm_core.h b/vm_core.h index 39f8a4749f..8240a3b4f5 100644 --- a/vm_core.h +++ b/vm_core.h @@ -323,7 +323,14 @@ struct rb_calling_info { struct rb_execution_context_struct; -#if 1 +#ifndef RUBY_CORE_DATA_TYPE_CHECK +# if RUBY_DEBUG +# define RUBY_CORE_DATA_TYPE_CHECK 1 +# else +# define RUBY_CORE_DATA_TYPE_CHECK 0 +# endif +#endif +#if !RUBY_CORE_DATA_TYPE_CHECK #define GetCoreDataFromValue(obj, type, data_type, ptr) ((ptr) = (type*)RTYPEDDATA_GET_DATA(obj)) #else #define GetCoreDataFromValue(obj, type, data_type, ptr) TypedData_Get_Struct(obj, type, data_type, ptr) -- cgit v1.2.3