On Jun 19, 2007, at 12:13 AM, chromatic wrote:

I hate seeing repeated code structures. We could simplify the mark () entry in
plenty of PMCs with a macro something like:
#define MARK_UNLESS_NULL(interp, struct, name) \
    if (struct->name) \
        pobject_lives(interp, (PObj *)struct->name)
Or better yet:

#define MARK_UNLESS_NULL(interp, struct, name) \
        if (struct->name) \
                pobject_lives(interp, (PObj *)struct->name); \
        else \
                (void) NULL

Josh


Reply via email to