-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_ary_get.c
21 lines (18 loc) · 1.01 KB
/
ft_ary_get.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ary_get.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kyork <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/09/24 15:05:29 by kyork #+# #+# */
/* Updated: 2016/09/24 15:23:36 by kyork ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
void *ft_ary_get(t_array *ary, size_t idx)
{
char *p;
p = ((char*)ary->ptr) + (idx * ary->item_size);
return ((void*)p);
}