Skip to content

Commit 6ab7f99

Browse files
committed
Revert "Temporary fix for #71. Remove when rust #48251 is fixed in stable."
This reverts commit 5d96ddc.
1 parent 1e76de1 commit 6ab7f99

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

Diff for: Cargo.toml

+4-15
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,10 @@ default = ["builtin-lua"]
1818
# specialized version of lua into your binary, you can disable this feature to
1919
# do that, but care must be taken. `rlua` makes at least the following
2020
# assumptions about the linked lua library:
21-
# * LUA_INTEGER is long long
22-
# * LUA_NUMBER as double
23-
# * LUA_EXTRASPACE is sizeof(void*)
24-
# * LUAI_MAXSTACK is 1000000
25-
# * LUAI_THROW / LUAI_TRY are defined so that they are compatible with jumping
26-
# over Rust stack frames. Rust is, as of the discussion around
27-
# https://github.com/rust-lang/rust/issues/48251, intended to be compatible in
28-
# at least a limited way with C libraries that use setjmp / longjmp error
29-
# handling, but there are some caveats. The linked bug prevents calling into
30-
# C APIs which use setjmp / longjmp handling *at all* on windows with at least
31-
# the 1.24.0 version of the rust compiler, and it remains to be seen but
32-
# potentially the 1.24.1 and 1.25 versions as well. Eventually the fix for
33-
# this will make it into stable rust, but until then there is a fix in the
34-
# bundled version of Lua to use __intrinsic_setjmp on windows instead of
35-
# setjmp to avoid unwinding and triggering rust issue #48251.
21+
# * LUA_INTEGER is long long
22+
# * LUA_NUMBER as double
23+
# * LUA_EXTRASPACE is sizeof(void*)
24+
# * LUAI_MAXSTACK is 1000000
3625
builtin-lua = ["gcc"]
3726

3827
[dependencies]

Diff for: lua/luaconf.h

+3-9
Original file line numberDiff line numberDiff line change
@@ -775,15 +775,9 @@
775775
** without modifying the main part of the file.
776776
*/
777777

778-
/*
779-
** rlua modification - fix for #71, temporary until the fix for
780-
** https://github.com/rust-lang/rust/issues/48251 is in stable rust
781-
*/
782-
#if defined(LUA_USE_WINDOWS)
783-
#define LUAI_THROW(L,c) longjmp((c)->b, 1)
784-
#define LUAI_TRY(L,c,a) if (__intrinsic_setjmp((c)->b, NULL) == 0) { a }
785-
#define luai_jmpbuf jmp_buf
786-
#endif
778+
779+
780+
787781

788782
#endif
789783

0 commit comments

Comments
 (0)