blob: bca997ac0f53d96afd4bc7a15d0b9e0d37e99ea3 [file] [log] [blame]
Jeff Thompson45545092013-07-16 18:36:26 -07001/**
2 * @author: Jeff Thompson
3 * See COPYING for copyright and distribution information.
4 */
5
6#ifndef NDN_NDN_REALLOC_H
Jeff Thompsona0d18c92013-08-06 13:55:32 -07007#define NDN_NDN_REALLOC_H
Jeff Thompson45545092013-07-16 18:36:26 -07008
Jeff Thompsona0d18c92013-08-06 13:55:32 -07009#ifdef __cplusplus
Jeff Thompson45545092013-07-16 18:36:26 -070010extern "C" {
11#endif
12
13/**
14 * Wrap the C stdlib realloc to convert to/from void * to unsigned char *.
15 * This can be used by ndn_DynamicUCharArray_init.
16 * @param array the allocated array buffer to realloc
17 * @param length the length for the new array buffer
18 * @return the new allocated array buffer
19 */
20unsigned char *ndn_realloc(unsigned char *array, unsigned int length);
21
Jeff Thompsona0d18c92013-08-06 13:55:32 -070022#ifdef __cplusplus
Jeff Thompson45545092013-07-16 18:36:26 -070023}
24#endif
25
26#endif