You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Rafael H. Schloming (JIRA)" <ji...@apache.org> on 2013/02/11 17:05:12 UTC
[jira] [Updated] (PROTON-148) Porting Issue -- Visual Studio
requires an explicit cast inside the resize macros
[ https://issues.apache.org/jira/browse/PROTON-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rafael H. Schloming updated PROTON-148:
---------------------------------------
Fix Version/s: 0.4
> 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
> 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