ruby-changes:55933
From: Nobuyoshi <ko1@a...>
Date: Fri, 31 May 2019 13:58:17 +0900 (JST)
Subject: [ruby-changes:55933] Nobuyoshi Nakada: d2f663d6f1 (trunk): STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS
https://git.ruby-lang.org/ruby.git/commit/?id=d2f663d6f1 From d2f663d6f185f62ef019434caf9bd6afd63849d4 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 31 May 2019 10:05:38 +0900 Subject: STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS diff --git a/method.h b/method.h index 2a6d85a..a604554 100644 --- a/method.h +++ b/method.h @@ -115,7 +115,8 @@ typedef enum { https://github.com/ruby/ruby/blob/trunk/method.h#L115 END_OF_ENUMERATION(VM_METHOD_TYPE) } rb_method_type_t; #define VM_METHOD_TYPE_MINIMUM_BITS 4 -/* TODO: STATIC_ASSERT for VM_METHOD_TYPE_MINIMUM_BITS */ +STATIC_ASSERT(VM_METHOD_TYPE_MINIMUM_BITS, + VM_METHOD_TYPE_REFINED <= (1<<VM_METHOD_TYPE_MINIMUM_BITS)); #ifndef rb_iseq_t typedef struct rb_iseq_struct rb_iseq_t; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/