--- OpenCL/gengetinfo 2012/05/01 16:37:23 1.12 +++ OpenCL/gengetinfo 2012/05/04 14:46:02 1.14 @@ -125,6 +125,12 @@ $extra_xs_args = ', OpenCL::Device device'; } + if ($CLASS eq "kernel_arg") { + $extra_args = ', idx'; + $extra_perl_args = ' ($idx)'; + $extra_xs_args = ', cl_uint idx'; + } + my $dynamic; my $nelem = "size / sizeof (*value)"; @@ -156,7 +162,9 @@ $perltype = "\$$perltype"; } - $POD .= "=item $perltype = \$$real_class->$perl_name$extra_perl_args\n\nCalls C with C<$name> and returns the result.\n\n"; + (my $perlenum = $name) =~ s/^CL_/OpenCL::/ or die; + + $POD .= "=item $perltype = \$$real_class->$perl_name$extra_perl_args\n\nCalls C with C<$perlenum> and returns the result.\n\n"; # XS1 contains the function before ALIAS, XS2 the function afterwards (the body) # after we generate the bdoy we look for an identical body generated earlier