Skip to content

Commit

Permalink
Fix safety.rst typo
Browse files Browse the repository at this point in the history
The documentation states SOL_SAFE_FUNCTION, but in code its called SOL_SAFE_FUNCTION(S)
  • Loading branch information
Maddimax authored and ThePhD committed Jul 13, 2024
1 parent 8525c20 commit 22f9cbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion documentation/source/safety.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Safety Config
* All calls from Lua will have their arguments checked
* Turned on by default with clang++, g++ and VC++ if a basic check for building in debug mode is detected (lack of ``_NDEBUG`` or similar compiler-specific checks)

``SOL_SAFE_FUNCTION`` triggers the following change:
``SOL_SAFE_FUNCTIONS`` triggers the following change:
* All uses of ``sol::function`` and ``sol::stack_function`` will default to ``sol::protected_function`` and ``sol::stack_protected_function``, respectively, rather than ``sol::unsafe_function`` and ``sol::stack_unsafe_function``
- Note this does not apply to ``sol::stack_aligned_function``: this variant must always be unprotected due to stack positioning requirements, especially in use with ``sol::stack_count``
* Will make any ``sol::state_view::script`` calls default to their safe variants if there is no supplied environment or error handler function
Expand Down

0 comments on commit 22f9cbf

Please sign in to comment.