[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Clang extension for BOOL and nil
From: |
Vincent R. |
Subject: |
Clang extension for BOOL and nil |
Date: |
Fri, 23 Aug 2013 11:25:40 +0200 |
User-agent: |
Roundcube Webmail/0.6 |
Hi,
Do you think it would be possible to use clang extension to define type
like BOOL and nil ?
Actually I am using clang to rewrite objc into another syntax and
macros are not really helpful for this,
I would need to get a specific type for BOOL/YES/NO and not just
(unsigned char)/(BOOL)1/(BOOL)0.
When compiling a Cocoa application on mac with clang there are the
following definitions :
#if __has_feature(objc_bool)
#define YES __objc_yes
#define NO __objc_no
#else
#define YES ((BOOL)1)
#define NO ((BOOL)0)
#endif
#ifndef nil
# if __has_feature(cxx_nullptr)
# define nil nullptr
# else
# define nil __DARWIN_NULL
# endif
#endif
I suppose it could help me in my task but I am wondering if it would
work with GNUStep,
and of course I will try tonight once I am at home on my linux box but
if someone(let's say David C. :-) )
have some idea about that.
- Clang extension for BOOL and nil,
Vincent R. <=