Jeff Thompson | 4554509 | 2013-07-16 18:36:26 -0700 | [diff] [blame] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
| 4 | */ |
| 5 | |
| 6 | #ifndef NDN_NDN_REALLOC_H |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 7 | #define NDN_NDN_REALLOC_H |
Jeff Thompson | 4554509 | 2013-07-16 18:36:26 -0700 | [diff] [blame] | 8 | |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 9 | #ifdef __cplusplus |
Jeff Thompson | 4554509 | 2013-07-16 18:36:26 -0700 | [diff] [blame] | 10 | extern "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 | */ |
| 20 | unsigned char *ndn_realloc(unsigned char *array, unsigned int length); |
| 21 | |
Jeff Thompson | a0d18c9 | 2013-08-06 13:55:32 -0700 | [diff] [blame] | 22 | #ifdef __cplusplus |
Jeff Thompson | 4554509 | 2013-07-16 18:36:26 -0700 | [diff] [blame] | 23 | } |
| 24 | #endif |
| 25 | |
| 26 | #endif |