diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-05-12 10:17:49 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-07-24 14:39:20 +0900 |
| commit | b2cd6d71bbb7e66cdb8067259ec607f270700977 (patch) | |
| tree | 8329cfa3cb9d07c8e9a32cda6f0b40d518c3d5bb | |
| parent | 2509297258b40f8b55bee252611efc28a12f2f67 (diff) | |
Cast up `int` instruction code to `VALUE`
Fix Visual C warnings:
```
iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size
```
| -rw-r--r-- | iseq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3390,7 +3390,7 @@ rb_vm_encoded_insn_data_table_init(void) const void * const *table = rb_vm_get_insns_address_table(); #define INSN_CODE(insn) ((VALUE)table[insn]) #else -#define INSN_CODE(insn) (insn) +#define INSN_CODE(insn) ((VALUE)(insn)) #endif st_data_t insn; encoded_insn_data = st_init_numtable_with_size(VM_INSTRUCTION_SIZE / 2); |
