wip: tests: show more debug information

This commit is contained in:
Khaïs COLIN 2025-02-26 14:07:55 +01:00 committed by Khaïs COLIN
parent c57a4a69a7
commit d303f22b73
7 changed files with 99 additions and 5 deletions

View file

@ -6,12 +6,14 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 17:07:01 by khais #+# #+# */
/* Updated: 2025/02/24 18:20:18 by khais ### ########.fr */
/* Updated: 2025/02/26 16:57:59 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#include "wordlist.h"
#include "ft_printf.h"
#include "libft.h"
#include "unistd.h"
#include <stdlib.h>
/*
@ -41,6 +43,7 @@ void wordlist_destroy(t_wordlist *wordlist)
while (wordlist != NULL)
{
ft_dprintf(STDERR_FILENO, "wordlist_destroy: %p\n", wordlist);
worddesc_destroy(wordlist->word);
prev = wordlist;
wordlist = wordlist->next;
@ -108,5 +111,6 @@ t_worddesc *wordlist_pop(t_wordlist **wordlist)
(*wordlist) = first->next;
word = first->word;
free(first);
ft_dprintf(STDERR_FILENO, "freed a wordlist in wordlist_pop: %p\n", first);
return (word);
}