Re: Is it better to use a macro or a function?
- From: Numeromancer <tschaef@xxxxxxxxxxxxx>
- Date: Fri, 08 Jun 2007 17:00:28 GMT
Johan Bengtsson wrote:
#define spt(ptr)(!(ptr))?NULL:ptr
This makes spt(ptr) equivalent to ptr.
would make it possible to write
s=spt(b)->s1;
No, it wouldn't.
Tim S
.
- Follow-Ups:
- Re: Is it better to use a macro or a function?
- From: Clark Cox
- Re: Is it better to use a macro or a function?
- References:
- Is it better to use a macro or a function?
- From: madhawi
- Re: Is it better to use a macro or a function?
- From: Ben Pfaff
- Re: Is it better to use a macro or a function?
- From: Johan Bengtsson
- Is it better to use a macro or a function?
- Prev by Date: Re: C
- Next by Date: Re: Finding out the active Unix shell
- Previous by thread: Re: Is it better to use a macro or a function?
- Next by thread: Re: Is it better to use a macro or a function?
- Index(es):