[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


NAME
    SetLocalItemPurge -- Set purge vector for a local context item.

SYNOPSIS
    SetLocalItemPurge (item, purgehook)
                        a0      a1

    struct LocalContextItem   *item;
    struct Hook            *purgehook;

FUNCTION
    Sets a local context item to use a client-supplied cleanup (purge)
    vector for disposal when its context is popped.  The purge vector
    will be called when the ContextNode containing this local item is
    popped off the context stack and is about to be deleted itself.  If
    the purge vector has not been set, the parser will use FreeLocalItem
    to delete the item, but if this function is used to set the purge
    vector, the supplied vector will be called with the following
    arguments:

            A0:     pointer to purgehook.
            A2:     pointer to LocalContextItem to be freed.
            A1:     pointer to a LONG containing the value
                    IFFCMD_PURGELCI.

    The user purge vector is then responsible for calling FreeLocalItem()
    as part of its own cleanup.  Although the purge vector can return a
    value, it will be ignored -- purge vectors must always work (best to
    return 0, though).

INPUTS
    item      - pointer to local context item.
    purgehook - pointer to a Hook structure.

RESULT

EXAMPLE

NOTES

BUGS

SEE ALSO
    AllocLocalItem(), FreeLocalItem(), utility/hooks.h