summaryrefslogtreecommitdiffstats
path: root/src/luabind-2-elif.patch
blob: 5debafcaa647683ead3f863ea2688536aa4a7991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
This file is part of MXE. See LICENSE.md for licensing information.

commit eb5ec7b7b1deb7301eba0333e6736a975b4396df
Author: Boris Nagaev <bnagaev@gmail.com>
Date:   Fri Aug 22 15:20:46 2014 +0400

    Replace #elif with #else #if

    See https://svn.boost.org/trac/boost/ticket/6631#comment:4

diff --git a/luabind/config.hpp b/luabind/config.hpp
index e8eea87..609fb95 100644
--- a/luabind/config.hpp
+++ b/luabind/config.hpp
@@ -58,20 +58,24 @@ namespace std
 // registered. Must at least be 2
 #ifndef LUABIND_MAX_ARITY
 	#define LUABIND_MAX_ARITY 10
-#elif LUABIND_MAX_ARITY <= 1
+#else
+#if LUABIND_MAX_ARITY <= 1
 	#undef LUABIND_MAX_ARITY
 	#define LUABIND_MAX_ARITY 2
 #endif
+#endif
 
 // the maximum number of classes one class
 // can derive from
 // max bases must at least be 1
 #ifndef LUABIND_MAX_BASES
 	#define LUABIND_MAX_BASES 4
-#elif LUABIND_MAX_BASES <= 0
+#else
+#if LUABIND_MAX_BASES <= 0
 	#undef LUABIND_MAX_BASES
 	#define LUABIND_MAX_BASES 1
 #endif
+#endif
 
 // LUABIND_NO_ERROR_CHECKING
 // define this to remove all error checks
diff --git a/luabind/detail/call_function.hpp b/luabind/detail/call_function.hpp
index 1b45ec1..8f5afff 100644
--- a/luabind/detail/call_function.hpp
+++ b/luabind/detail/call_function.hpp
@@ -323,7 +323,8 @@ namespace luabind
 
 #endif // LUABIND_CALL_FUNCTION_HPP_INCLUDED
 
-#elif BOOST_PP_ITERATION_FLAGS() == 1
+#else
+#if BOOST_PP_ITERATION_FLAGS() == 1
 
 #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
 #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
@@ -440,4 +441,5 @@ namespace luabind
 
 
 #endif
+#endif
 
diff --git a/luabind/detail/call_member.hpp b/luabind/detail/call_member.hpp
index de8d563..e63555b 100644
--- a/luabind/detail/call_member.hpp
+++ b/luabind/detail/call_member.hpp
@@ -316,7 +316,8 @@ namespace luabind
 
 #endif // LUABIND_CALL_MEMBER_HPP_INCLUDED
 
-#elif BOOST_PP_ITERATION_FLAGS() == 1
+#else
+#if BOOST_PP_ITERATION_FLAGS() == 1
 
 #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
 #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
@@ -360,4 +361,5 @@ namespace luabind
 #undef LUABIND_TUPLE_PARAMS
 
 #endif
+#endif
 
diff --git a/luabind/detail/policy.hpp b/luabind/detail/policy.hpp
index 689c733..4a02a90 100644
--- a/luabind/detail/policy.hpp
+++ b/luabind/detail/policy.hpp
@@ -1004,7 +1004,8 @@ namespace luabind { namespace
 	  return boost::arg<0>();
   }
 # define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>(*)()
-#elif defined(BOOST_MSVC) || defined(__MWERKS__) \
+#else
+#if defined(BOOST_MSVC) || defined(__MWERKS__) \
   || (BOOST_VERSION >= 103900 && defined(__GNUC__) \
         && (__GNUC__ * 100 + __GNUC_MINOR__ == 400))
   static boost::arg<0> return_value;
@@ -1015,6 +1016,7 @@ namespace luabind { namespace
   boost::arg<0> result;
 # define LUABIND_PLACEHOLDER_ARG(N) boost::arg<N>
 #endif
+#endif
 }}
 
 #endif // LUABIND_POLICY_HPP_INCLUDED
diff --git a/luabind/wrapper_base.hpp b/luabind/wrapper_base.hpp
index d54c668..0f88cc5 100755
--- a/luabind/wrapper_base.hpp
+++ b/luabind/wrapper_base.hpp
@@ -89,7 +89,8 @@ namespace luabind
 
 #endif // LUABIND_WRAPPER_BASE_HPP_INCLUDED
 
-#elif BOOST_PP_ITERATION_FLAGS() == 1
+#else
+#if BOOST_PP_ITERATION_FLAGS() == 1
 
 #define LUABIND_TUPLE_PARAMS(z, n, data) const A##n *
 #define LUABIND_OPERATOR_PARAMS(z, n, data) const A##n & a##n
@@ -188,3 +189,4 @@ namespace luabind
 #undef N
 
 #endif
+#endif