Skip to content

Commit

Permalink
Always user Zend memory allocation wrappers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Alshanetsky committed Dec 17, 2003
1 parent ae4a09b commit 664268b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions ext/tidy/tidy.c
Expand Up @@ -156,7 +156,6 @@ zend_module_entry tidy_module_entry = {
ZEND_GET_MODULE(tidy)
#endif

#if MEMORY_LIMIT
void *php_tidy_malloc(size_t len)
{
return emalloc(len);
Expand All @@ -171,7 +170,7 @@ void php_tidy_free(void *buf)
{
efree(buf);
}
#endif

void php_tidy_panic(ctmbstr msg)
{
zend_error(E_ERROR, "Could not allocate memory for tidy! (Reason: %s)", (char *)msg);
Expand Down Expand Up @@ -297,11 +296,9 @@ static void tidy_object_new(zend_class_entry *class_type, zend_object_handlers *
break;

case is_doc:
#if MEMORY_LIMIT
tidySetMallocCall(php_tidy_malloc);
tidySetReallocCall(php_tidy_realloc);
tidySetFreeCall(php_tidy_free);
#endif
tidySetPanicCall(php_tidy_panic);

intern->ptdoc = emalloc(sizeof(PHPTidyDoc));
Expand Down

0 comments on commit 664268b

Please sign in to comment.