- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/tecsgen/tecs/mruby/TECSPointer.h
r321 r429 102 102 { \ 103 103 if( sizeof( type ) > sizeof( mrb_int ) ){ \ 104 if( val > = (((type)1) << (sizeof(mrb_int)*8-1))\105 || val < -(((type)1) << (sizeof(mrb_int)*8-1))) \104 if( val > TYPE ## _MAX \ 105 || val < TYPE ## _MIN ) \ 106 106 /* '=' unecessary for negative value */ \ 107 107 /* ignore warning on int32_t */ \ … … 126 126 { \ 127 127 if( sizeof( type ) > sizeof( mrb_int ) ){ \ 128 if( val >= (((type)1) << (sizeof(mrb_int)*8)))\128 if( val > TYPE ## _MAX ) \ 129 129 /* '=' unecessary for negative value */ \ 130 130 /* ignore warning on int32_t */ \ … … 148 148 VALCHECK_MRB_INT( Int16, INT16, int16_t ) 149 149 VALCHECK_UINT( UInt8, UINT8, uint8_t ) 150 #define VALCHECK_MRB_UInt8 150 #define VALCHECK_MRB_UInt8(mrb,val) 151 151 VALCHECK_UINT( UInt16, UINT16, uint16_t ) 152 #define VALCHECK_MRB_UInt16 152 #define VALCHECK_MRB_UInt16(mrb,val) 153 153 VALCHECK_INT( Int32, INT32, int32_t ) 154 #define VALCHECK_MRB_Int32 154 #define VALCHECK_MRB_Int32(mrb,val) 155 155 VALCHECK_UINT( UInt32, UINT32, uint32_t ) 156 #define VALCHECK_MRB_UInt32 156 #define VALCHECK_MRB_UInt32(mrb,val) 157 157 158 158 VALCHECK_INT( Int64, INT64, int64_t ) … … 163 163 VALCHECK_MRB_UINT( UInt64, UINT64, uint64_t ) 164 164 #else 165 #define VALCHECK_MRB_Int64 // 範囲チェックが無意味であるため、警告が出るのを回避する166 #define VALCHECK_MRB_UInt64 // 範囲チェックが無意味であるため、警告が出るのを回避する165 #define VALCHECK_MRB_Int64(mrb,val) // 範囲チェックが無意味であるため、警告が出るのを回避する 166 #define VALCHECK_MRB_UInt64(mrb,val) // 範囲チェックが無意味であるため、警告が出るのを回避する 167 167 #endif 168 168
Note:
See TracChangeset
for help on using the changeset viewer.