Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
WIndows using Visual Studio 2010
Description
The PN_ENSURE and PN_ENSUREZ macros do not compile using Visual Studio toolset.
Suggest changing the macros to the following for both ports:
#define PN_ENSURE(ARRAY, CAPACITY, COUNT, PNTYPE) \
while ((CAPACITY) < (COUNT))
#define PN_ENSUREZ(ARRAY, CAPACITY, COUNT, PNTYPE) \
{ \ size_t _old_capacity = (CAPACITY); \ PN_ENSURE((ARRAY), (CAPACITY), (COUNT), PNTYPE); \ memset((ARRAY) + _old_capacity, 0, \ sizeof(*(ARRAY))*((CAPACITY) - _old_capacity)); \ }