Bug 123584 JavaScript engine should use malloc/realloc/free consistently

Removing the unused JS_NEW and JS_DELETE macros per brendan
This commit is contained in:
timeless%mozdev.org 2004-02-25 14:01:24 +00:00
parent 33607fc717
commit 6368e4dcbc

View File

@ -56,27 +56,6 @@ JS_BEGIN_EXTERN_C
***********************************************************************/
#define JS_MALLOC(_bytes) (malloc((_bytes)))
/***********************************************************************
** FUNCTION: JS_DELETE()
** DESCRIPTION:
** JS_DELETE() unallocates an object previosly allocated via JS_NEW()
** or JS_NEWZAP() to the heap.
** INPUTS: pointer to previously allocated object
** OUTPUTS: the referenced object is returned to the heap
** RETURN: void
***********************************************************************/
#define JS_DELETE(_ptr) { free(_ptr); (_ptr) = NULL; }
/***********************************************************************
** FUNCTION: JS_NEW()
** DESCRIPTION:
** JS_NEW() allocates an item of type _struct from the heap.
** INPUTS: _struct: a data type
** OUTPUTS: pointer to _struct
** RETURN: pointer to _struct or error returns from malloc().
***********************************************************************/
#define JS_NEW(_struct) ((_struct *) JS_MALLOC(sizeof(_struct)))
#ifdef DEBUG
extern JS_PUBLIC_API(void)