about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-07-15 10:13:31 +0000
committerEric Wong <e@80x24.org>2018-07-16 19:34:32 +0000
commitdea1a38e2390c40a71591a4c08c5c021b9693328 (patch)
tree3288d2d3f7acdf54a232fc3acffb82db9fa8274b
parentcc66994a8a667821e2dc479d33b77a8e7a09c280 (diff)
downloadmwrap-dea1a38e2390c40a71591a4c08c5c021b9693328.tar.gz
An "int" length is enough for the source location length, as
it's not going to exceed PATH_MAX by much.
-rw-r--r--ext/mwrap/mwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c
index 7455c54..2b946b1 100644
--- a/ext/mwrap/mwrap.c
+++ b/ext/mwrap/mwrap.c
@@ -826,7 +826,7 @@ static VALUE cSrcLoc;
 static VALUE mwrap_aref(VALUE mod, VALUE loc)
 {
         const char *str = StringValueCStr(loc);
-        long len = RSTRING_LEN(loc);
+        int len = RSTRING_LENINT(loc);
         struct src_loc *k = 0;
         uintptr_t p;
         struct cds_lfht_iter iter;