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

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

	SetLocalItemPurge(localItem, purgeHook);
	                  A0         A1

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

	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

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

	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).

	localItem - pointer to a local context item.
	purgeHook - pointer to a Hook structure.

	AllocLocalItem(), FreeLocalItem(), <utility/hooks.h>

[Back to Amiga Developer Docs]