Skip to content

Instantly share code, notes, and snippets.

View amdsobhy's full-sized avatar

Ahmed Sobhy amdsobhy

  • Canada
View GitHub Profile
@amdsobhy
amdsobhy / list.c
Created August 21, 2019 15:39 — 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;