Оновити 'cv4/list_ops.c'
This commit is contained in:
parent
555af18e67
commit
031f0b4c6a
@ -1,6 +1,9 @@
|
|||||||
#include "list_ops.h"
|
#include "list_ops.h"
|
||||||
|
|
||||||
list_t *new_list(size_t length, list_element_t elements[]){
|
list_t *new_list(size_t length, list_element_t elements[]){
|
||||||
|
list_t* list = (list_t*)malloc(sizeof(list_t) + length * sizeof(list_element_t));
|
||||||
|
list->length = length;
|
||||||
|
memcpy(list->elements,elements, length*sizeof(list_element_t));
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user