]> granicus.if.org Git - php/commitdiff
Always user Zend memory allocation wrappers.
authorIlia Alshanetsky <iliaa@php.net>
Wed, 17 Dec 2003 16:34:10 +0000 (16:34 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 17 Dec 2003 16:34:10 +0000 (16:34 +0000)
ext/tidy/tidy.c

index c7c43bbe11f2acdbcabecf2bec316dcbe4f9960b..4c6f10a51fbd95c5846431bd2c3bf3487dbfdd8c 100644 (file)
@@ -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);
@@ -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);
@@ -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));