[issue20596] Support for alternate wcstok syntax for Windows compilers
Serhiy Storchaka
report at bugs.python.org
Tue Feb 11 21:53:24 CET 2014
Serhiy Storchaka added the comment:
The code can be a little more clear if use indentation in preprocessor directives:
#ifdef MS_WINDOWS
# ifdef _MSC_VER
# define Py_WCSTOK(x,y,z) wcstok_s(x,y,z)
# else
# ifdef __WATCOMC__
# define Py_WCSTOK(x,y,z) wcstok(x,y,z)
# else
# define Py_WCSTOK(x,y,z) wcstok(x,y)
# endif /* __WATCOMC__ */
# endif /* _MSC_VER */
#endif /* MS_WINDOWS */
Or may be even using #elif:
#ifdef MS_WINDOWS
# if defined(_MSC_VER)
# define Py_WCSTOK(x,y,z) wcstok_s(x,y,z)
# elif defined(__WATCOMC__)
# define Py_WCSTOK(x,y,z) wcstok(x,y,z)
# else
# define Py_WCSTOK(x,y,z) wcstok(x,y)
# endif
#endif /* MS_WINDOWS */
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20596>
_______________________________________
More information about the Python-bugs-list
mailing list