Skip to content

Instantly share code, notes, and snippets.

View DoctorRainer's full-sized avatar
🏠
Working from home

Rainer Reinhardt DoctorRainer

🏠
Working from home
View GitHub Profile
@DoctorRainer
DoctorRainer / list.c
Created February 27, 2018 17:14 — forked from pseudomuto/list.c
Blog Code: Implementing a Generic Linked List in C
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "list.h"
void list_new(list *list, int elementSize, freeFunction freeFn)
{
assert(elementSize > 0);
list->logicalLength = 0;