Skip to content

dll_push*

Taras Maliukh edited this page Apr 11, 2020 · 1 revision

Synopsis:

dll_obj_t *dll_pushfront(dll_t *restrict dll,
	void *restrict data,
	size_t data_size,
	dll_bits_t obj_bits,
	f_dll_obj_data_del fn_del);
dll_obj_t *dll_pushfrontobj(dll_t *restrict dll,
	dll_obj_t *restrict dll_obj);

dll_obj_t *dll_pushback(dll_t *restrict dll,
	void *restrict data,
	size_t data_size,
	dll_bits_t obj_bits,
	f_dll_obj_data_del fn_del);
dll_obj_t *dll_pushbackobj(dll_t *restrict dll,
	dll_obj_t *restrict dll_obj);

Description:

  • dll_pushfront: Creating a new list object at the front of list from given parameters
  • dll_pushfrontobj: Adding a given object at the front of list
  • dll_pushback: Creating a new list object at the end of list from given parameters
  • dll_pushbackobj: Adding a given object at the end of list

!!! Strongly recommended to setup \param fn_del if you allocate memory inside \param data !!!

For specifying behavior for the object - set bits using this bits

Return value:

Pointer to the new created\added object otherwise NULL if:

Clone this wiki locally