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

Removing the unused JS_NEW and JS_DELETE macros per brendan


git-svn-id: svn://10.0.0.236/trunk@153212 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2004-02-25 14:01:24 +00:00
parent 4276d3af21
commit 21792e511e

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)