You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Stas Bekman <st...@stason.org> on 2003/10/15 00:06:09 UTC

Re: cvs commit: httpd-apreq-2/glue/perl/xsbuilder apreq_xs_postperl.h

joes@apache.org wrote:
> joes        2003/10/14 12:16:37
> 
>   Modified:    glue/perl/xsbuilder apreq_xs_postperl.h
>   Log:
>   Applied Geoffrey Young's apreq_xs_postperl.h patch to fix -Werror compile errors.
>   
>   Revision  Changes    Path
>   1.17      +5 -3      httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h
>   
>   Index: apreq_xs_postperl.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h,v
>   retrieving revision 1.16
>   retrieving revision 1.17
>   diff -u -r1.16 -r1.17
>   --- apreq_xs_postperl.h	14 Oct 2003 18:53:30 -0000	1.16
>   +++ apreq_xs_postperl.h	14 Oct 2003 19:16:37 -0000	1.17
>   @@ -186,6 +186,8 @@
>    {                                                       \
>        char *class = NULL;                                 \
>        dXSARGS;                                            \
>   +    items = items;  /* -Werror */                       \
>   +                                                        \

May be you don't need dXSARGS, if you don't use 'items'? It's defined as:

#define dXSARGS				\
	dSP; dMARK;			\
	dAX; dITEMS

so you can use only those macros that you really need.

The

   items = items;  /* -Werror */

workaround is really only useful for autogenerated code, which has no idea if 
items is needed or not.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: cvs commit: httpd-apreq-2/glue/perl/xsbuilder apreq_xs_postperl.h

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> May be you don't need dXSARGS, if you don't use 'items'? It's defined as:
> 
> #define dXSARGS                \
>     dSP; dMARK;            \
>     dAX; dITEMS
> 
> so you can use only those macros that you really need.

ah, I figured there must have been a better way
> 
> The
> 
>   items = items;  /* -Werror */
> 
> workaround is really only useful for autogenerated code, which has no 
> idea if items is needed or not.

well, I got the idea from Apache.xs in mp1, which uses this kind of 
workaround a lot (and isn't autogenerated :)  but you're probably right :)

--Geoff