about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-02-06 10:50:47 +0000
committerEric Wong <normalperson@yhbt.net>2011-02-06 10:50:47 +0000
commit925cf20495f5b8286672c6533350485f96a4dbb9 (patch)
tree8a44da4c297d0e06bc80e6b7af50536b2e53a35b
parentd88a3f93dce4b75068c3137d8dd92009195d0576 (diff)
downloadkcar-925cf20495f5b8286672c6533350485f96a4dbb9.tar.gz
Not that we'll ever deal with monster strings in
HTTP headers...
-rw-r--r--ext/kcar/kcar.rl8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/kcar/kcar.rl b/ext/kcar/kcar.rl
index b86f8e1..52b6a88 100644
--- a/ext/kcar/kcar.rl
+++ b/ext/kcar/kcar.rl
@@ -175,9 +175,9 @@ static void write_value(VALUE hdr, struct http_parser *hp,
   VALUE f, v;
   VALUE hclass;
   const char *fptr = PTR_TO(start.field);
-  long flen = hp->s.field_len;
+  size_t flen = hp->s.field_len;
   const char *vptr;
-  long vlen;
+  size_t vlen;
 
   HP_FL_SET(hp, HASHEADER);
 
@@ -191,8 +191,8 @@ static void write_value(VALUE hdr, struct http_parser *hp,
   vlen = LEN(mark, p);
   VALIDATE_MAX_LENGTH(vlen, FIELD_VALUE);
   VALIDATE_MAX_LENGTH(flen, FIELD_NAME);
-  f = rb_str_new(fptr, flen);
-  v = rb_str_new(vptr, vlen);
+  f = rb_str_new(fptr, (long)flen);
+  v = rb_str_new(vptr, (long)vlen);
 
   /* needs more tests for error-checking here */
   /*