Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2148 closed defect (fixed)


Reported by: dmorissette Owned by: dmorissette
Priority: normal Milestone: 5.0 release
Component: MapServer C Library Version:
Severity: normal Keywords:
Cc: umberto


As part of the work on RFC-24 the following two macros have been defined:

#define MS_REFCNT_IS_NOT_ZERO(obj) (MS_REFCNT_DECR(obj))>0
#define MS_REFCNT_IS_ZERO(obj) (MS_REFCNT_DECR(obj))<=0 

Code using those macros is confusing because it is not clear that they decrement the refcount in addition to testing whether it's zero. I proposed that we rename them to make it clear that the macros do not just test the refcount but also decrement it first. Umberto agreed with the change and we settled on the following names:

#define MS_REFCNT_DECR_IS_ZERO(obj) (MS_REFCNT_DECR(obj))<=0

This ticket is to track this change.

Change History (2)

comment:1 Changed 12 years ago by dmorissette

Resolution: fixed
Status: newclosed

Fixed. Macros renamed in r6285

comment:2 Changed 12 years ago by dmorissette

Milestone: 5.0 release
Note: See TracTickets for help on using tickets.