mirror of
https://github.com/janet-lang/janet
synced 2025-02-01 17:59:10 +00:00
Add failure to initialize protections for filewatch module.
This commit is contained in:
parent
5c67c1165d
commit
84d43d1039
@ -370,8 +370,6 @@ static void janet_watcher_listen(JanetWatcher *watcher) {
|
|||||||
janet_panicv(janet_ev_lasterr());
|
janet_panicv(janet_ev_lasterr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
janet_panic("nyi");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
@ -416,6 +414,7 @@ static void janet_watcher_listen(JanetWatcher *watcher) {
|
|||||||
static int janet_filewatch_mark(void *p, size_t s) {
|
static int janet_filewatch_mark(void *p, size_t s) {
|
||||||
JanetWatcher *watcher = (JanetWatcher *) p;
|
JanetWatcher *watcher = (JanetWatcher *) p;
|
||||||
(void) s;
|
(void) s;
|
||||||
|
if (watcher->stream == NULL) return 0; /* Incomplete initialization */
|
||||||
#ifndef JANET_WINDOWS
|
#ifndef JANET_WINDOWS
|
||||||
janet_mark(janet_wrap_abstract(watcher->stream));
|
janet_mark(janet_wrap_abstract(watcher->stream));
|
||||||
#endif
|
#endif
|
||||||
@ -426,6 +425,7 @@ static int janet_filewatch_mark(void *p, size_t s) {
|
|||||||
|
|
||||||
static int janet_filewatch_gc(void *p, size_t s) {
|
static int janet_filewatch_gc(void *p, size_t s) {
|
||||||
JanetWatcher *watcher = (JanetWatcher *) p;
|
JanetWatcher *watcher = (JanetWatcher *) p;
|
||||||
|
if (watcher->stream == NULL) return 0; /* Incomplete initialization */
|
||||||
(void) s;
|
(void) s;
|
||||||
janet_table_deinit(&watcher->watch_descriptors);
|
janet_table_deinit(&watcher->watch_descriptors);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user