--- OpenCL/OpenCL.xs 2012/04/19 13:49:33 1.28 +++ OpenCL/OpenCL.xs 2012/04/19 13:51:36 1.29 @@ -156,18 +156,17 @@ while (extracount--) *l++ = *extra++; - for (i = 0; i < len; ++i) + for (i = 0; i < len; i += 2) { - cl_context_properties t = SvIV (*av_fetch (av, i, 0)); + cl_context_properties t = SvIV (*av_fetch (av, i , 0)); + SV *p_sv = *av_fetch (av, i + 1, 0); cl_context_properties v; - ++i; - switch (t) { default: /* unknown property, treat as int */ - v = SvIV (*av_fetch (av, i, 0)); + v = SvIV (p_sv); break; }