1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-28 07:08:14 +00:00

Fix typo: destory -> destroy

This commit is contained in:
Calvin Rose 2020-02-28 09:04:28 -06:00
parent 6b093bdcca
commit b17bf259f7

View File

@ -186,7 +186,7 @@ static JanetMailboxPair *make_mailbox_pair(JanetMailbox *original) {
return pair;
}
static void destory_mailbox_pair(JanetMailboxPair *pair) {
static void destroy_mailbox_pair(JanetMailboxPair *pair) {
janet_mailbox_ref(pair->original, -1);
janet_mailbox_ref(pair->newbox, -1);
free(pair);
@ -471,13 +471,13 @@ static int thread_worker(JanetMailboxPair *pair) {
}
/* Normal exit */
destory_mailbox_pair(pair);
destroy_mailbox_pair(pair);
janet_deinit();
return 0;
/* Fail to set something up */
error:
destory_mailbox_pair(pair);
destroy_mailbox_pair(pair);
janet_eprintf("\nthread failed to start\n");
janet_deinit();
return 1;
@ -566,7 +566,7 @@ static Janet cfun_thread_new(int32_t argc, Janet *argv) {
JanetMailboxPair *pair = make_mailbox_pair(janet_vm_mailbox);
JanetThread *thread = janet_make_thread(pair->newbox, encode);
if (janet_thread_start_child(pair)) {
destory_mailbox_pair(pair);
destroy_mailbox_pair(pair);
janet_panic("could not start thread");
}