common.c (215187) | common.c (223935) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file common.h 4/// \brief Common functions needed in many places in liblzma 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 21 unchanged lines hidden (view full) --- 30 return LZMA_VERSION_STRING; 31} 32 33 34/////////////////////// 35// Memory allocation // 36/////////////////////// 37 | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file common.h 4/// \brief Common functions needed in many places in liblzma 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 21 unchanged lines hidden (view full) --- 30 return LZMA_VERSION_STRING; 31} 32 33 34/////////////////////// 35// Memory allocation // 36/////////////////////// 37 |
38extern void * lzma_attribute((malloc)) | 38extern void * lzma_attribute((__malloc__)) lzma_attr_alloc_size(1) |
39lzma_alloc(size_t size, lzma_allocator *allocator) 40{ 41 // Some malloc() variants return NULL if called with size == 0. 42 if (size == 0) 43 size = 1; 44 45 void *ptr; 46 --- 342 unchanged lines hidden --- | 39lzma_alloc(size_t size, lzma_allocator *allocator) 40{ 41 // Some malloc() variants return NULL if called with size == 0. 42 if (size == 0) 43 size = 1; 44 45 void *ptr; 46 --- 342 unchanged lines hidden --- |