Permalink
Browse files

Bigger CArray

  • Loading branch information...
1 parent 55cb790 commit be1f5e5d800d95ac48fc42c0ec9fcc6b566f363b @azawawi committed Nov 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 examples/getinfo.p6
View
@@ -17,12 +17,13 @@ if CURLE_OK == $res {
# ask for the content-type
my $ct = CArray[int].new;
- $ct[$_] = 1 for 0..2;
+ my $length = 20;
+ $ct[$_] = 0 for 0..$length - 1;
$res = curl_easy_getinfo($curl, CURLINFO_CONTENT_TYPE, $ct);
if (CURLE_OK == $res) && $ct {
printf("We received Content-Type: %s\n", $ct[0]);
- say "\$ct[$_] = {$ct[$_]}" for 0..2;
+ say "\$ct[$_] = {$ct[$_]}" for 0..$length - 1;
}
# always cleanup

0 comments on commit be1f5e5

Please sign in to comment.