apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: [PATCH] revised: Does anyone want this committed?
Date Fri, 03 Aug 2001 08:49:37 GMT
Did you actually compile any of this?

>
>+#define abort() DebugBreak();
>+#define assert(x) if (!(x)) DebugBreak;
>+
> #endif  /*APR_PRIVATE_H*/
> #endif  /*WIN32*/
>
Should be:

  #define abort() DebugBreak()
  #define assert(x) if ((x)); else DebugBreak()


Note the lack of semicolons at the end of the macro expansions, and the 
change to avoid the dangling else problem.


>+#ifdef APR_POOL_DEBUG
>+#define APR_STRINGIFY(S) APR_REALLY_STRINGIFY(S)
>+#define APR_REALLY_STRINGIFY(S) #S
>+#endif
>
Here you define APR_STRINGIFY, ...

>
>+#if defined(APR_POOL_DEBUG)
>+#define apr_pool_alloc_init(p) \
>+    (apr_pool_alloc_init)(p, #p " (" STRINGIFY(__LINE__) ") " __FILE__)
>+#else
>
... but use STRINGIFY later on.

Naughty, naughty.


-- 
Brane ─îibej
    home:   <brane@xbc.nu>             http://www.xbc.nu/brane/
    work:   <branko.cibej@hermes.si>   http://www.hermes-softlab.com/
     ACM :   <brane@acm.org>            http://www.acm.org/




Mime
View raw message