Skip to content

Commit e5e6466

Browse files
committed
Fix configuration macros
- Enable all necessary configuration macros to be deliberately shut off, appropriately - Fix version macro headings
1 parent 288f4f4 commit e5e6466

File tree

8 files changed

+304
-117
lines changed

8 files changed

+304
-117
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
cmake_minimum_required(VERSION 3.5.0)
2626

2727
# # # project declaration
28-
project(sol2 VERSION 3.2.2 LANGUAGES CXX C)
28+
project(sol2 VERSION 3.2.3 LANGUAGES CXX C)
2929

3030
include(GNUInstallDirs)
3131

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## sol3 (sol2 v3.2.2)
1+
## sol3 (sol2 v3.2.3)
22

33
[![Linux & Max OSX Build Status](https://travis-ci.org/ThePhD/sol2.svg?branch=develop)](https://travis-ci.org/ThePhD/sol2)
44
[![Windows Build status](https://ci.appveyor.com/api/projects/status/n38suofr21e9uk7h?svg=true)](https://ci.appveyor.com/project/ThePhD/sol2)

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
# The short X.Y version.
5858
version = '3.2'
5959
# The full version, including alpha/beta/rc tags.
60-
release = '3.2.2'
60+
release = '3.2.3'
6161

6262
# The language for content autogenerated by Sphinx. Refer to documentation
6363
# for a list of supported languages.

include/sol/stack_core.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@
4040
#include <bitset>
4141
#include <forward_list>
4242
#include <string>
43+
#include <limits>
4344
#include <algorithm>
4445
#include <sstream>
4546
#include <optional>
47+
#include <type_traits>
4648

4749
namespace sol {
4850
namespace detail {

include/sol/version.hpp

+97-36
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
// clang-format off
3232

3333
#define SOL_VERSION_MAJOR 3
34-
#define SOL_VERSION_MINOR 5
35-
#define SOL_VERSION_PATCH 0
36-
#define SOL_VERSION_STRING "3.5.0"
34+
#define SOL_VERSION_MINOR 2
35+
#define SOL_VERSION_PATCH 3
36+
#define SOL_VERSION_STRING "3.2.3"
3737
#define SOL_VERSION ((SOL_VERSION_MAJOR * 100000) + (SOL_VERSION_MINOR * 100) + (SOL_VERSION_PATCH))
3838

3939
#define SOL_IS_ON(OP_SYMBOL) ((3 OP_SYMBOL 3) != 0)
@@ -179,20 +179,32 @@
179179
#define SOL_RTTI_I_ SOL_DEFAULT_ON
180180
#endif
181181

182-
#if defined(SOL_NO_THREAD_LOCAL) && (SOL_NO_THREAD_LOCAL != 0)
183-
#define SOL_USE_THREAD_LOCAL_I_ SOL_OFF
182+
#if defined(SOL_NO_THREAD_LOCAL)
183+
#if SOL_NO_THREAD_LOCAL != 0
184+
#define SOL_USE_THREAD_LOCAL_I_ SOL_OFF
185+
#else
186+
#define SOL_USE_THREAD_LOCAL_I_ SOL_ON
187+
#endif
184188
#else
185189
#define SOL_USE_THREAD_LOCAL_I_ SOL_DEFAULT_ON
186190
#endif // thread_local keyword is bjorked on some platforms
187191

188-
#if defined(SOL_ALL_SAFETIES_ON) && (SOL_ALL_SAFETIES_ON != 0)
189-
#define SOL_ALL_SAFETIES_ON_I_ SOL_ON
192+
#if defined(SOL_ALL_SAFETIES_ON)
193+
#if SOL_ALL_SAFETIES_ON != 0
194+
#define SOL_ALL_SAFETIES_ON_I_ SOL_ON
195+
#else
196+
#define SOL_ALL_SAFETIES_ON_I_ SOL_FF
197+
#endif
190198
#else
191199
#define SOL_ALL_SAFETIES_ON_I_ SOL_DEFAULT_OFF
192200
#endif
193201

194-
#if defined(SOL_SAFE_GETTER) && (SOL_SAFE_GETTER != 0)
195-
#define SOL_SAFE_GETTER_I_ SOL_ON
202+
#if defined(SOL_SAFE_GETTER)
203+
#if SOL_SAFE_GETTER != 0
204+
#define SOL_SAFE_GETTER_I_ SOL_ON
205+
#else
206+
#define SOL_SAFE_GETTER_I_ SOL_OFF
207+
#endif
196208
#else
197209
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
198210
#define SOL_SAFE_GETTER_I_ SOL_ON
@@ -203,8 +215,12 @@
203215
#endif
204216
#endif
205217

206-
#if defined(SOL_SAFE_USERTYPE) && (SOL_SAFE_USERTYPE != 0)
207-
#define SOL_SAFE_USERTYPE_I_ SOL_ON
218+
#if defined(SOL_SAFE_USERTYPE)
219+
#if SOL_SAFE_USERTYPE != 0
220+
#define SOL_SAFE_USERTYPE_I_ SOL_ON
221+
#else
222+
#define SOL_SAFE_USERTYPE_I_ SOL_OFF
223+
#endif
208224
#else
209225
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
210226
#define SOL_SAFE_USERTYPE_I_ SOL_ON
@@ -215,8 +231,12 @@
215231
#endif
216232
#endif
217233

218-
#if defined(SOL_SAFE_REFERENCES) && (SOL_SAFE_REFERENCES != 0)
219-
#define SOL_SAFE_REFERENCES_I_ SOL_ON
234+
#if defined(SOL_SAFE_REFERENCES)
235+
#if SOL_SAFE_REFERENCES != 0
236+
#define SOL_SAFE_REFERENCES_I_ SOL_ON
237+
#else
238+
#define SOL_SAFE_REFERENCES_I_ SOL_OFF
239+
#endif
220240
#else
221241
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
222242
#define SOL_SAFE_REFERENCES_I_ SOL_ON
@@ -227,9 +247,18 @@
227247
#endif
228248
#endif
229249

230-
#if (defined(SOL_SAFE_FUNCTIONS) && (SOL_SAFE_FUNCTIONS != 0)) \
231-
|| (defined(SOL_SAFE_FUNCTION_OBJECTS) && (SOL_SAFE_FUNCTION_OBJECTS != 0))
232-
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
250+
#if defined(SOL_SAFE_FUNCTIONS)
251+
#if SOL_SAFE_FUNCTIONS != 0
252+
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
253+
#else
254+
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_OFF
255+
#endif
256+
#elif defined (SOL_SAFE_FUNCTION_OBJECTS)
257+
#if SOL_SAFE_FUNCTION_OBJECTS != 0
258+
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
259+
#else
260+
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_OFF
261+
#endif
233262
#else
234263
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
235264
#define SOL_SAFE_FUNCTION_OBJECTS_I_ SOL_ON
@@ -240,8 +269,12 @@
240269
#endif
241270
#endif
242271

243-
#if defined(SOL_SAFE_FUNCTION_CALLS) && (SOL_SAFE_FUNCTION_CALLS != 0)
244-
#define SOL_SAFE_FUNCTION_CALLS_I_ SOL_ON
272+
#if defined(SOL_SAFE_FUNCTION_CALLS)
273+
#if SOL_SAFE_FUNCTION_CALLS != 0
274+
#define SOL_SAFE_FUNCTION_CALLS_I_ SOL_ON
275+
#else
276+
#define SOL_SAFE_FUNCTION_CALLS_I_ SOL_OFF
277+
#endif
245278
#else
246279
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
247280
#define SOL_SAFE_FUNCTION_CALLS_I_ SOL_ON
@@ -252,8 +285,12 @@
252285
#endif
253286
#endif
254287

255-
#if defined(SOL_SAFE_PROXIES) && (SOL_SAFE_PROXIES != 0)
256-
#define SOL_SAFE_PROXIES_I_ SOL_ON
288+
#if defined(SOL_SAFE_PROXIES)
289+
#if SOL_SAFE_PROXIES != 0
290+
#define SOL_SAFE_PROXIES_I_ SOL_ON
291+
#else
292+
#define SOL_SAFE_PROXIES_I_ SOL_OFF
293+
#endif
257294
#else
258295
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
259296
#define SOL_SAFE_PROXIES_I_ SOL_ON
@@ -264,8 +301,12 @@
264301
#endif
265302
#endif
266303

267-
#if defined(SOL_SAFE_NUMERICS) && (SOL_SAFE_NUMERICS != 0)
268-
#define SOL_SAFE_NUMERICS_I_ SOL_ON
304+
#if defined(SOL_SAFE_NUMERICS)
305+
#if SOL_SAFE_NUMERICS != 0
306+
#define SOL_SAFE_NUMERICS_I_ SOL_ON
307+
#else
308+
#define SOL_SAFE_NUMERICS_I_ SOL_OFF
309+
#endif
269310
#else
270311
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
271312
#define SOL_SAFE_NUMERICS_I_ SOL_ON
@@ -276,8 +317,12 @@
276317
#endif
277318
#endif
278319

279-
#if defined(SOL_SAFE_STACK_CHECK) && (SOL_SAFE_STACK_CHECK != 0)
280-
#define SOL_SAFE_STACK_CHECK_I_ SOL_ON
320+
#if defined(SOL_SAFE_STACK_CHECK)
321+
#if SOL_SAFE_STACK_CHECK != 0
322+
#define SOL_SAFE_STACK_CHECK_I_ SOL_ON
323+
#else
324+
#define SOL_SAFE_STACK_CHECK_I_ SOL_OFF
325+
#endif
281326
#else
282327
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
283328
#define SOL_SAFE_STACK_CHECK_I_ SOL_ON
@@ -288,9 +333,18 @@
288333
#endif
289334
#endif
290335

291-
#if (defined(SOL_NO_CHECK_NUMBER_PRECISION) && (SOL_NO_CHECK_NUMBER_PRECISION != 0)) \
292-
|| (defined(SOL_NO_CHECKING_NUMBER_PRECISION) && (SOL_NO_CHECKING_NUMBER_PRECISION != 0))
293-
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
336+
#if defined(SOL_NO_CHECK_NUMBER_PRECISION)
337+
#if SOL_NO_CHECK_NUMBER_PRECISION != 0
338+
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
339+
#else
340+
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
341+
#endif
342+
#elif defined(SOL_NO_CHECKING_NUMBER_PRECISION)
343+
#if SOL_NO_CHECKING_NUMBER_PRECISION != 0
344+
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_OFF
345+
#else
346+
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
347+
#endif
294348
#else
295349
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
296350
#define SOL_NUMBER_PRECISION_CHECKS_I_ SOL_ON
@@ -313,9 +367,18 @@
313367
#define SOL_STRINGS_ARE_NUMBERS_I_ SOL_DEFAULT_OFF
314368
#endif
315369

316-
#if defined(SOL_ENABLE_INTEROP) && (SOL_ENABLE_INTEROP != 0) \
317-
|| defined(SOL_USE_INTEROP) && (SOL_USE_INTEROP != 0)
318-
#define SOL_USE_INTEROP_I_ SOL_ON
370+
#if defined(SOL_ENABLE_INTEROP)
371+
#if SOL_ENABLE_INTEROP != 0
372+
#define SOL_USE_INTEROP_I_ SOL_ON
373+
#else
374+
#define SOL_USE_INTEROP_I_ SOL_OFF
375+
#endif
376+
#elif defined(SOL_USE_INTEROP)
377+
#if SOL_USE_INTEROP != 0
378+
#define SOL_USE_INTEROP_I_ SOL_ON
379+
#else
380+
#define SOL_USE_INTEROP_I_ SOL_OFF
381+
#endif
319382
#else
320383
#define SOL_USE_INTEROP_I_ SOL_DEFAULT_OFF
321384
#endif
@@ -437,16 +500,14 @@
437500
#endif
438501
#endif
439502

440-
#if defined(SOL_DEFAULT_PASS_ON_ERROR) && (SOL_DEFAULT_PASS_ON_ERROR != 0)
441-
#define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_ON
442-
#else
443-
#if SOL_IS_ON(SOL_ALL_SAFETIES_ON_I_)
503+
#if defined(SOL_DEFAULT_PASS_ON_ERROR)
504+
#if (SOL_DEFAULT_PASS_ON_ERROR != 0)
444505
#define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_ON
445-
#elif SOL_IS_ON(SOL_DEBUG_BUILD_I_)
446-
#define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_DEFAULT_ON
447506
#else
448507
#define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_OFF
449508
#endif
509+
#else
510+
#define SOL_DEFAULT_PASS_ON_ERROR_I_ SOL_DEFAULT_OFF
450511
#endif
451512

452513
#if defined(SOL_USING_CXX_LUA)

single/include/sol/config.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
// This file was generated with a script.
23-
// Generated 2020-10-03 21:34:25.034794 UTC
24-
// This header was generated with sol v3.2.1 (revision 48eea7b5)
23+
// Generated 2020-10-15 05:17:12.555590 UTC
24+
// This header was generated with sol v3.2.2 (revision 288f4f4e)
2525
// https://github.com/ThePhD/sol2
2626

2727
#ifndef SOL_SINGLE_CONFIG_HPP

0 commit comments

Comments
 (0)