ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/OpenCL.xs
(Generate patch)

Comparing OpenCL/OpenCL.xs (file contents):
Revision 1.28 by root, Thu Apr 19 13:49:33 2012 UTC vs.
Revision 1.29 by root, Thu Apr 19 13:51:36 2012 UTC

154 croak ("%s: %s is not a property list (must be even number of elements)", func, svname); 154 croak ("%s: %s is not a property list (must be even number of elements)", func, svname);
155 155
156 while (extracount--) 156 while (extracount--)
157 *l++ = *extra++; 157 *l++ = *extra++;
158 158
159 for (i = 0; i < len; ++i) 159 for (i = 0; i < len; i += 2)
160 { 160 {
161 cl_context_properties t = SvIV (*av_fetch (av, i, 0)); 161 cl_context_properties t = SvIV (*av_fetch (av, i , 0));
162 SV *p_sv = *av_fetch (av, i + 1, 0);
162 cl_context_properties v; 163 cl_context_properties v;
163
164 ++i;
165 164
166 switch (t) 165 switch (t)
167 { 166 {
168 default: 167 default:
169 /* unknown property, treat as int */ 168 /* unknown property, treat as int */
170 v = SvIV (*av_fetch (av, i, 0)); 169 v = SvIV (p_sv);
171 break; 170 break;
172 } 171 }
173 172
174 *l++ = t; 173 *l++ = t;
175 *l++ = v; 174 *l++ = v;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines