Windows: Call C++ destructors without compiling with /EHa.

Thanks to Peter Cawley. #593
This commit is contained in:
Mike Pall
2023-09-15 05:47:29 +02:00
parent 7a1c139569
commit bd2d107151
2 changed files with 30 additions and 9 deletions

View File

@@ -426,9 +426,7 @@ the toolchain used to compile LuaJIT:
on the C stack. The contents of the C++ exception object
pass through unmodified.</li>
<li>Lua errors can be caught on the C++ side with <tt>catch(...)</tt>.
The corresponding Lua error message can be retrieved from the Lua stack.<br>
For MSVC for Windows 64 bit this requires compilation of your C++ code
with <tt>/EHa</tt>.</li>
The corresponding Lua error message can be retrieved from the Lua stack.</li>
<li>Throwing Lua errors across C++ frames is safe. C++ destructors
will be called.</li>
</ul>