epatrizio / cds

Data structures in C language
The Unlicense
0 stars 0 forks source link

Vector implementation refactoring #3

Open epatrizio opened 3 years ago

epatrizio commented 3 years ago

Vector API more easy with basics management of a resizable array (only : size, get, set, resize)

epatrizio commented 3 years ago

As explain in issue #2, impossible now to set an element over size. Set is for update, use add element for adding an element (inside or at the end)

epatrizio commented 3 years ago

Refacto linked_list and queue > like vector approach

epatrizio commented 3 years ago

Purpose of this commit : https://github.com/epatrizio/cds/commit/c2b519c833089096134d324908fb3db955f0009e

Add a specific test for custom struct type vector (How init the structure and associated functions) Important : for this, i had to move vector functions macros from vector.c to vector.h I don't know if it's a good way : concept of abstraction and encapsulation ... : view issue #4