[ 
https://issues.apache.org/jira/browse/PROTON-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Cliff Jansen resolved PROTON-148.
---------------------------------

    Resolution: Fixed

fixed in PROTON-159
                
> Porting Issue -- Visual Studio requires an explicit cast inside the resize 
> macros
> ---------------------------------------------------------------------------------
>
>                 Key: PROTON-148
>                 URL: https://issues.apache.org/jira/browse/PROTON-148
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>         Environment: WIndows using Visual Studio 2010
>            Reporter: Mary hinton
>            Assignee: Cliff Jansen
>              Labels: build
>             Fix For: 0.4
>
>         Attachments: PN_ENSURE.patch
>
>
> 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))  {                     \
>     (CAPACITY) = (CAPACITY) ? 2 * (CAPACITY) : 16;   \
>     (ARRAY) = (PNTYPE) realloc((ARRAY), (CAPACITY) * sizeof (*(ARRAY))); \
>   }
> #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)); \
>   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to