]> granicus.if.org Git - php/commitdiff
MFH: fix #40800 (cannot disable memory_limit with -1)
authorAntony Dovgal <tony2001@php.net>
Wed, 14 Mar 2007 11:58:05 +0000 (11:58 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 14 Mar 2007 11:58:05 +0000 (11:58 +0000)
Zend/zend_alloc.c
Zend/zend_alloc.h

index 34f5b77b60728276b387c03796067d7ffe47f14e..96999acc99b6e8ba1b28cc27ace4ab8401455909 100644 (file)
@@ -2060,7 +2060,7 @@ ZEND_API char *zend_strndup(const char *s, uint length)
 }
 
 
-ZEND_API int zend_set_memory_limit(unsigned int memory_limit)
+ZEND_API int zend_set_memory_limit(size_t memory_limit)
 {
        TSRMLS_FETCH();
 
index c77ab47028c9e68f98f7d412217a1cc64a21684f..93555fbf7a387c2116fec1d28b5bc3a6e55eb1a6 100644 (file)
@@ -124,7 +124,7 @@ inline static void * __zend_realloc(void *p, size_t len)
 #define safe_estrdup(ptr)  ((ptr)?(estrdup(ptr)):STR_EMPTY_ALLOC())
 #define safe_estrndup(ptr, len) ((ptr)?(estrndup((ptr), (len))):STR_EMPTY_ALLOC())
 
-ZEND_API int zend_set_memory_limit(unsigned int memory_limit);
+ZEND_API int zend_set_memory_limit(size_t memory_limit);
 
 ZEND_API void start_memory_manager(TSRMLS_D);
 ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC);