ZEND_GET_MODULE(tidy)
#endif
-#if MEMORY_LIMIT
void *php_tidy_malloc(size_t len)
{
return emalloc(len);
{
efree(buf);
}
-#endif
+
void php_tidy_panic(ctmbstr msg)
{
zend_error(E_ERROR, "Could not allocate memory for tidy! (Reason: %s)", (char *)msg);
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));