From f0147293990f2a400912f4f8abd1b456319da0e6 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Mon, 26 Jan 2015 10:16:52 +0100 Subject: fixed _NOEXCEPT macro for normal compilers, updated version number to force recompile of extensions after we introduced the constants --- include/noexcept.h | 21 +++++++++++++++++++++ include/version.h | 2 +- phpcpp.h | 1 + tests/cpp/include/doubl2str.h | 1 - zend/includes.h | 12 +----------- 5 files changed, 24 insertions(+), 13 deletions(-) create mode 100644 include/noexcept.h diff --git a/include/noexcept.h b/include/noexcept.h new file mode 100644 index 0000000..25dc1a4 --- /dev/null +++ b/include/noexcept.h @@ -0,0 +1,21 @@ +/** + * NoExcept.h + * + * Some compilers (hello microsoft!) do not yet support the "noexcept" + * keyword. To overcome this, we use a macro that expands to "noexcept" + * + * @author Emiel Bruijntjes + * @author atvive + */ + +/** + * Macro to be able to support MSVC compiler + */ +#ifndef _NOEXCEPT +# ifndef _MSC_VER +# define _NOEXCEPT noexcept +# else +# define _NOEXCEPT __declspec(nothrow) +# endif +#endif + diff --git a/include/version.h b/include/version.h index 85d2b66..7038f20 100644 --- a/include/version.h +++ b/include/version.h @@ -12,6 +12,6 @@ /** * Macro with version number (this is incremented with every release) */ -#define PHPCPP_API_VERSION 20150120 +#define PHPCPP_API_VERSION 20150126 diff --git a/phpcpp.h b/phpcpp.h index dd89a2d..0b0beb0 100644 --- a/phpcpp.h +++ b/phpcpp.h @@ -27,6 +27,7 @@ /** * Include all headers files that are related to this library */ +#include #include #include #include diff --git a/tests/cpp/include/doubl2str.h b/tests/cpp/include/doubl2str.h index 66f2b86..5c7f208 100644 --- a/tests/cpp/include/doubl2str.h +++ b/tests/cpp/include/doubl2str.h @@ -3,7 +3,6 @@ * double -> string * */ - #include #include std::string double2str(long double d) diff --git a/zend/includes.h b/zend/includes.h index 93c74ec..31d3963 100644 --- a/zend/includes.h +++ b/zend/includes.h @@ -43,20 +43,10 @@ */ #define BOOL2SUCCESS(b) ((b) ? SUCCESS : FAILURE) -/** - * Macro to be able to support MSVC compiler - */ -#ifndef _NOEXCEPT -# ifndef _MSC_VER -# define _NOEXCEPT noexecpt -# else -# define _NOEXCEPT __declspec(nothrow) -# endif -#endif - /** * Include other files from this library */ +#include "../include/noexcept.h" #include "../include/version.h" #include "../include/inivalue.h" #include "../include/ini.h" -- cgit v1.2.3