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


   NAME
	SetLocalItemPurge -- set purge vector for a local context item. (V36)

   SYNOPSIS
	SetLocalItemPurge(localItem, purgeHook);
	                  A0         A1

	VOID SetLocalItemPurge(struct LocalContextItem *, struct Hook *);

   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
	localItem - pointer to a local context item.
	purgeHook - pointer to a Hook structure.

   SEE ALSO
	AllocLocalItem(), FreeLocalItem(), <utility/hooks.h>
	<libraries/iffparse.h>