diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-11-30 17:40:41 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-01-31 18:41:30 +0900 |
| commit | 7ef8c470d211af63b0898340074db373d55bc225 (patch) | |
| tree | a1a87f45e29ac32d713ea95cea709e4f55eb983f | |
| parent | eae7300a09a4b9bd87045b313dcdd464d12dd683 (diff) | |
Enable check for core data types by `RUBY_DEBUG`
| -rw-r--r-- | vm_core.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) |
