blob: 7aeb6afb3359b32db6bb633f4f1df1f48f436dff [file] [log] [blame]
Jeff Thompson45545092013-07-16 18:36:26 -07001/**
Jeff Thompson7687dc02013-09-13 11:54:07 -07002 * Copyright (C) 2013 Regents of the University of California.
3 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
Jeff Thompson45545092013-07-16 18:36:26 -07004 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NDN_NDN_REALLOC_H
Jeff Thompsona0d18c92013-08-06 13:55:32 -07008#define NDN_NDN_REALLOC_H
Jeff Thompson45545092013-07-16 18:36:26 -07009
Jeff Thompson10ad12a2013-09-24 16:19:11 -070010#include "dynamic-uint8-array.h"
Jeff Thompson9254d742013-08-12 12:04:44 -070011
Jeff Thompsona0d18c92013-08-06 13:55:32 -070012#ifdef __cplusplus
Jeff Thompson45545092013-07-16 18:36:26 -070013extern "C" {
14#endif
15
16/**
Jeff Thompson10ad12a2013-09-24 16:19:11 -070017 * Wrap the C stdlib realloc to convert to/from void * to uint8_t *.
18 * This can be used by ndn_DynamicUInt8Array_initialize.
Jeff Thompson9254d742013-08-12 12:04:44 -070019 * @param self This is ignored.
20 * @param array the allocated array buffer to realloc.
21 * @param length the length for the new array buffer.
22 * @return the new allocated array buffer.
Jeff Thompson45545092013-07-16 18:36:26 -070023 */
Jeff Thompson97223af2013-09-24 17:01:27 -070024uint8_t *ndn_realloc(struct ndn_DynamicUInt8Array *self, uint8_t *array, size_t length);
Jeff Thompson45545092013-07-16 18:36:26 -070025
Jeff Thompsona0d18c92013-08-06 13:55:32 -070026#ifdef __cplusplus
Jeff Thompson45545092013-07-16 18:36:26 -070027}
28#endif
29
30#endif