On Mon, Dec 13, 2004 at 08:12:19PM -0500, Stas Bekman wrote:
> In fact we already somewhat handle that in modperl_io_apache.h
> 
> 
> 
> #ifdef PERLIO_LAYERS
> [...]
> MP_INLINE void modperl_io_apache_init(pTHX);
> 
> #else /* #ifdef PERLIO_LAYERS */
> 
> #define modperl_io_apache_init(pTHX)

> 
> 
> but for some reason define doesn't do the trick, when it gets to do:
> 
>   const void *modperl_hack_io_apache_init =
>      (const void *)modperl_io_apache_init;

The C preprocessor won't expand a parameterized macro unless it's called
with parameters:

$ cpp
#define foo(bar) bar
foo(norman)
foo blah
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"

norman
foo blah



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to