From f46c63cddba276eb29b79395b4f369a89c35be6e Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 3 Apr 2009 01:09:10 +0000 Subject: [PATCH] redefined QSE_NULL for C++ --- qse/include/qse/macros.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/qse/include/qse/macros.h b/qse/include/qse/macros.h index f2bebd72..9deec4b9 100644 --- a/qse/include/qse/macros.h +++ b/qse/include/qse/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h 90 2009-03-01 09:58:19Z hyunghwan.chung $ + * $Id: macros.h 119 2009-04-02 07:09:10Z hyunghwan.chung $ * Copyright 2006-2009 Chung, Hyung-Hwan. @@ -22,17 +22,19 @@ #include #ifdef __cplusplus - /*#define QSE_NULL ((qse_uint_t)0)*/ -# define QSE_NULL (0) +# if QSE_SIZEOF_VOID_P == QSE_SIZEOF_INT +# define QSE_NULL (0) +# elif QSE_SIZEOF_VOID_P == QSE_SIZEOF_LONG +# define QSE_NULL (0l) +# elif QSE_SIZEOF_VOID_P == QSE_SIZEOF_LONG_LONG +# define QSE_NULL (0ll) +# else +# define QSE_NULL (0) +# endif #else # define QSE_NULL ((void*)0) #endif - -/*#define QSE_TRUE (0 == 0) -#define QSE_FALSE (0 != 0) -*/ - #define QSE_MCHAR_EOF ((qse_mcint_t)-1) #define QSE_WCHAR_EOF ((qse_wcint_t)-1) #define QSE_CHAR_EOF ((qse_cint_t)-1)