summaryrefslogtreecommitdiffhomepage
path: root/src/load.c
diff options
context:
space:
mode:
authorMasaki Muranaka <[email protected]>2013-03-09 00:30:06 +0900
committerMasaki Muranaka <[email protected]>2013-03-09 00:30:06 +0900
commit8a7f5360cf58492467df6ec236355436bdc2a977 (patch)
tree4e8f4ece6a6649fd622d63f99d1a24fabbdb1f7e /src/load.c
parent51de2ba1d903dafdd5607e8efd4197e2c6620235 (diff)
downloadmruby-8a7f5360cf58492467df6ec236355436bdc2a977.tar.gz
mruby-8a7f5360cf58492467df6ec236355436bdc2a977.zip
Sanity check. As there are implicaton SIZE_MAX >= UINT32_MAX in this code. This assumption may break on some targets which have 16bit memory space.
Diffstat (limited to 'src/load.c')
-rw-r--r--src/load.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/load.c b/src/load.c
index be3d9ac65..8cd303ca5 100644
--- a/src/load.c
+++ b/src/load.c
@@ -12,6 +12,12 @@
#include "mruby/irep.h"
+#ifndef _WIN32
+# if SIZE_MAX < UINT32_MAX
+# error "It can't be run this code on this environment (SIZE_MAX < UINT32_MAX)"
+# endif
+#endif
+
static size_t
offset_crc_body()
{