|
Posted by Sisyphus on April 10, 2006, 11:57 pm
Please log in for more thread options
> > It's probably worth pointing out that if you ever declare dXSARGS
> > in a function, then 'items' becomes a keyword (within that function)
> > and any attempt to use 'items' as a variable name (within that
> > function) will produce fatal redefinition errors - error messages
> > that don't really make it clear just what the problem is. For that
> > reason I always avoid using 'items' as a variable name .... even
> > though it's often the logical name to bestow upon the variable.
>
> I got my "items" from perldoc perlxs where it says:
> XSUBs can have variable-length parameter lists by specifying an
> ellipsis "(...)" in the parameter list. This use of the ellipsis
> is similar to that found in ANSI C. The programmer is able to
> determine the number of arguments passed to the XSUB by examining
> the "items" variable which the xsubpp compiler supplies for all <==
> XSUBs. By using this mechanism one can create an XSUB which
> accepts a list of parameters of unknown length.
>
Aaaahh .... sorry - I thought you had declared and were using a variable
named 'items' - but you're obviously not. In fact, you're using 'items' as
that very same reserved variable I was talking about. My mistake.
Cheers,
Rob
|