PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ SHPReallocObjectBufIfNecessary()

static unsigned char * SHPReallocObjectBufIfNecessary ( SHPHandle  psSHP,
int  nObjectBufSize 
)
static

Definition at line 1812 of file shpopen.c.

1814{
1815 unsigned char* pBuffer;
1816 if( nObjectBufSize == 0 )
1817 {
1818 nObjectBufSize = 4 * sizeof(double);
1819 }
1820 if( nObjectBufSize > psSHP->nObjectBufSize )
1821 {
1822 pBuffer = STATIC_CAST(unsigned char*, realloc( psSHP->pabyObjectBuf, nObjectBufSize ));
1823 if( pBuffer != SHPLIB_NULLPTR )
1824 {
1825 psSHP->pabyObjectBuf = pBuffer;
1826 psSHP->nObjectBufSize = nObjectBufSize;
1827 }
1828 }
1829 else
1830 pBuffer = psSHP->pabyObjectBuf;
1831 return pBuffer;
1832}
#define STATIC_CAST(type, x)
Definition shpopen.c:100
#define SHPLIB_NULLPTR
Definition shpopen.c:101
unsigned char * pabyObjectBuf
Definition shapefil.h:338
int nObjectBufSize
Definition shapefil.h:339

References SHPInfo::nObjectBufSize, SHPInfo::pabyObjectBuf, SHPLIB_NULLPTR, and STATIC_CAST.

Referenced by if().

Here is the caller graph for this function: