From f0f03ad519c37d8b3a051c7303fcadfb7ba50512 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 4 Jun 2024 21:11:08 -0500 Subject: [PATCH 1/2] Delete dead code. --- src/core/table.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/core/table.c b/src/core/table.c index d6174027..4ebcde5f 100644 --- a/src/core/table.c +++ b/src/core/table.c @@ -319,13 +319,6 @@ JANET_CORE_FN(cfun_table_new, int32_t cap = janet_getnat(argv, 0); return janet_wrap_table(janet_table(cap)); } -/* - uint32_t flags = janet_getflags(argv, 1, "kv"); - if (flags == 0) return janet_wrap_table(janet_table(cap)); - if (flags == 1) return janet_wrap_table(janet_table_weakk(cap)); - if (flags == 2) return janet_wrap_table(janet_table_weakv(cap)); - return janet_wrap_table(janet_table_weakkv(cap)); - */ JANET_CORE_FN(cfun_table_weak, "(table/weak capacity)", From e2a8951f688fec8362f725e4a8afd3c79bc1854e Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 7 Jun 2024 10:28:39 -0500 Subject: [PATCH 2/2] Address #1452 - Partial revert some changes from #1391 This doesn't seem to reintroduce the original issue. There was definitely some interplay with #1431 Doing git bisect landed me at commit 2f0c789ea12198ace34b7218a3001b4f6447a9ee as the first bad commit for issue #1452. --- src/core/ev.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/ev.c b/src/core/ev.c index 88b4efb0..e277b6e8 100644 --- a/src/core/ev.c +++ b/src/core/ev.c @@ -281,13 +281,9 @@ void janet_async_start(JanetStream *stream, JanetAsyncMode mode, JanetEVCallback janet_assert(!fiber->ev_callback, "double async on fiber"); if (mode & JANET_ASYNC_LISTEN_READ) { stream->read_fiber = fiber; - } else { - stream->read_fiber = NULL; } if (mode & JANET_ASYNC_LISTEN_WRITE) { stream->write_fiber = fiber; - } else { - stream->write_fiber = NULL; } fiber->ev_callback = callback; fiber->ev_stream = stream;