[ Thread Index |
| More lists.liballeg.org/allegro-developers Archives
On Tue, Feb 23, 2010 at 11:56 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
>> Can we do this?
>> #define AL_ASSERT assert
> IMO, yes. (well, add some brackets around it)
I tried to do this - #included <assert.h> in debug.h then #define
AL_ASSERT assert and also the #define ASSERT which happens when
Allegro itself is being built. However I got warnings that 'assert'
was being used implicitly in (for example) aintern_vector.h line 28
where the AL_INLINE macro was being used. So it seemed to have
expanded the 'ASSERT' to 'assert' but not then expanded 'assert'
(which is itself a macro)
As far as I understand the C preprocessor it should have carried on
expanding, is there some macro magic I'm missing?