1
0
mirror of https://github.com/deadw00d/AROS.git synced 2025-12-06 21:40:57 +00:00
Files
AROS-v0/workbench/libs/iffparse/freelocalitem.c
Matthias Rustler 6b5a534ce3 workbench: detabbed
2021-05-02 13:55:14 +02:00

63 lines
1.3 KiB
C

/*
Copyright (C) 1995-2007, The AROS Development Team. All rights reserved.
*/
#include "iffparse_intern.h"
/*****************************************************************************
NAME */
#include <proto/iffparse.h>
AROS_LH1(void, FreeLocalItem,
/* SYNOPSIS */
AROS_LHA(struct LocalContextItem *, localItem, A0),
/* LOCATION */
struct Library *, IFFParseBase, 34, IFFParse)
/* FUNCTION
Frees a local context item previously allocated by AllocLocalItem.
This functioned should always be calles by custom LCI purge hooks.
INPUTS
localItem - pointer to LocalContextItem struct.
RESULT
NOTES
EXAMPLE
BUGS
SEE ALSO
AllocLocalItem()
INTERNALS
*****************************************************************************/
{
AROS_LIBFUNC_INIT
if (localItem != NULL)
{
/* If the LCI has supplied userdata, then free it */
if ( GetIntLCI(localItem)->lci_UserData )
{
FreeMem
(
GetIntLCI(localItem)->lci_UserData,
GetIntLCI(localItem)->lci_UserDataSize
);
}
/* Free the LCI itself */
FreeMem(localItem, sizeof (struct IntLocalContextItem));
}
AROS_LIBFUNC_EXIT
} /* FreeLocalItem */